Microsoft KB Archive/65963

= INF: Calculating Space for the Storage of NULL Values =

Article ID: 65963

Article Last Modified on 11/14/2003

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition
 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q65963



SUMMARY
This article explains how to calculate the amount of space needed for the storage of NULL values.



MORE INFORMATION
For all standard data types, NULL values stored by Microsoft SQL Server do not take up any additional storage space. The only associated overhead for a column containing a NULL value is a single byte in the storage record that defines a pointer to the column. This is a fixed cost that is associated with the creation of the column. There is a special case for Text/Image storage.

If the columns were created with &quot;nulls allowed,&quot; no additional space is allocated for Text and Image columns until data is actually inserted into those columns. However, once a Text or Image column has had data inserted into it, the page space remains allocated even if the column is changed to NULL. The only way to free this allocated page space is to delete the row.

Keywords: kbusage KB65963

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.