• Rune Bivrin (9/24/2010)


    Exactly how often do you encounter a GUI where there's a little check box labeled "Don't know if there's a cell phone"?

    If the distinction between "empty string" and "value is missing" (not necessarily unknown!) is important to the business, then the front end designers better make sure that there is some (preferably intuitive) way to make that distinction when entering data.

    If it's not important, then the database developer should permit only one case (either by a NOT NULL constraint, or by a CHECK (column <> '') constraint, depending on what the reason is for leaving the column empty and what the expected behaviour is.


    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/