Home > Database > MS SQL Server > The lesser known SPARSE Column in MS SQL SERVER

The lesser known SPARSE Column in MS SQL SERVER

Introduced in SQL Server 2008, The SPARSE column is better at managing database size when null values are a plenty in that particular column.

To declare a particular column as sparse we have to simply specify the keyword ‘sparse’ after declaring the column name and the data type.

 

Please refer to the below mentioned queries for a better understanding of sparse column and its use.

 

5

 

You can see here that the space occupied by null values sparse columns is far less than the regular column with null value.

 

Post Comments if this helps

This Article is TAGGED in , , , . BOOKMARK THE permalink.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">