SQL Database Concepts Question:

Download Job Interview Questions and Answers PDF

Explain what are Sparse columns?

Basic SQL Server Interview Question
Basic SQL Server Interview Question

Answer:

Sparse column is a type of column which is used to optimize storage for null values.
When a column there is big number of null then by defining that column as spars column we can save a large amount of disk space.
The drawback of sparse column is that it requires more space for the non null values. When we define a column as sparse it requires additional 4 Byte for not null values.
For example, a DATETIME column in a non-sparse column required 8 bytes of storage whereas if we define that column as a sparse column then it will require 12 bytes.
It is not possible to set ROWGUIDCOL and IDENTITY properties in sparse column.

Download Basic SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what are the ways available in SQL Server to execute SQL statements?Tell me in brief how SQL server enhances scalability of the database system?