Which Transact-SQL will execute successfully and create a table with a sparse column?

Correct Answer for the following Question is given below

You are a database administrator on an instance of SQL Server. While creating a table, you decide to implement a sparse column.Which Transact-SQL will execute successfully and create a table with a sparse column?ID int IDENTITY(1,1),TranDate datetime,ProductID int SPARSE NOT NULL,Quantity smallint,ProdType char(2),ProdDetails varchar(max));ID int SPARSE NULL IDENTITY(1,1),TranDate datetime,ProductID int,Quantity smallint,ProdType char(2),ProdDetails varchar(max));ID int IDENTITY(1,1),TranDate datetime,ProductID int NOT NULL,Quantity smallint,ProdType char(2),ProdDetails varbinary(max) FILESTREAM SPARSE);ID int IDENTITY(1,1),TranDate datetime,ProductID int SPARSE NULL,Quantity smallint,ProdType char(2),ProdDetails varchar(max));Sparse columns are ordinary columns that have an optimized storage for null values. Sparse columns reduce the space requirements for null values at the cost of more overhead to retrieve nonnull values. Consider using sparse columns when the space saved is at least 20 percent to 40 percent.Sparse columns have the following restrictions:• A sparse column cannot be of the following data types: text, ntext, image, timestamp, user-defined data type, geometry, or geography; or have the FILESTREAM attribute. So option C is incorrect.• A sparse column must be nullable. So option A is incorrect.• A sparse column cannot have a default value and cannot have the ROWGUIDCOL or IDENTITY properties. So option B is incorrect.

Question:

Which Transact-SQL will execute successfully and create a table with a sparse column?

Options:

CREATE TABLE Table1 (

CREATE TABLE Table1 (

CREATE TABLE Table1 (

CREATE TABLE Table1 (

Correct Answer

The Correct Answer for this Question is

CREATE TABLE Table1 (

Explanation

The Question – Which Transact-SQL will execute successfully and create a table with a sparse column? has been answered correctly and answers for the question is CREATE TABLE Table1 (

More about these Exams

These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.

We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.

you can find more here at mnccertified

Feel free to contact via comment or email.

Happy Learning

Cheers, Team MNCcertified

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *