• Ernie Schlangen (8/29/2012)


    From http://msdn.microsoft.com/en-us/library/ms174979.aspx:

    SPARSE

    Indicates that the column is a sparse column. The storage of sparse columns is optimized for null values. Sparse columns cannot be designated as NOT NULL. For additional restrictions and more information about sparse columns, see Use Sparse Columns.

    If a sparse column cannot be designated as NOT NULL, is there a NULL/NOT NULL property to be transferred or does making the column SPARSE automatically make the column NULLable? Or does a SPARSE column have a NULL property that just cannot be changed to NOT NULL? Just wondering... :unsure:

    Run Wayne's code... aftewards do sp_help Table1 to get the structure of the table back. There's still a Nullable property.

    I just never realized the Nullability of a column transferred with INTO. That's neat, just not something I ever worried about because I generally use INTO #temptables, not to make new ones, and as I"m normally dumping partial contents of tables into the #temp, the values are what I'm normally more interested in.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]