NULL Columns QUery

  • Hi,

    I have a column which contains XML data. If I were to set the values to NULL, would this use less space than the XML data? (No NC index exists on this column. Only a clustered index on the PK).

    Thanks

  • Setting a var-whatever (which is what an XML column is) column to NULL does not suddenly shrink the row down by the amount of bytes the column was consuming. It merely sets the null bit in the header for that column. You would need to rebuild the clustered index, or create a new table and insert the contents of the old one to compact everything.

    The probability of survival is inversely proportional to the angle of arrival.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply