• I rated this article "poor". A lot of the information is correct, and relevant - but there is a very important error, right at the start of the article.

    The author writes:

    A NULL value in SQL Server is (by design) meant to indicate an unknown or undefined value

    And this is absolutely not true. (Though it is indeed described this way in Books Online).

    The implementation of NULL in SQL Server (not only SQL Server 2008!!) follows the ANSI standard. And the ANSI standard defines "the null value" as:

    null value: A special value that is used to indicate the absence of any data value.

    The key words here are "absence of any data value". Or, as I usually describe it: NULL represents missing data.

    NULL does therefore NOT represent unknown data. Of course, the reason that data is missing might be that it is unknown (patient still in coma and unidentified; name, birthdate, etc are all unknown). But it might also be that it is inapplicable (when doing prenatal surgery, the patient has no name or birthday yet). Or it might be known, but totally irrelevant (there are good reasons to register the number of children a female patients has put into the world; for male patients, it's totally irrelevant in a medical database).


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/