• Koen Verbeeck (5/9/2012)


    Good question, learned something.

    However, the question itself was a bit weird to read (at least for me, a non-native English speaker). I had to read it a few times to finally get it. And then answer wrong of course 😀

    The CREATE TABLE reference doesn't describe the behaviour asked in the question. The following article does:

    Use Column Sets

    Adding a column set changes the behavior of SELECT * queries. The query will return the column set as an XML column and not return the individual sparse columns. Schema designers and software developers must be careful not to break existing applications.

    Dang, I sure wish that I had found this reference when I was looking. This is much better than what I was able to find. Thanks Koen!

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2