A NULL value means no value or unknown. It does not mean zero or blank, or even an empty string. Those values are not unknown. A NULL value can be used for values that haven’t been supplied yet, for example, when a customer has not yet supplied an email address. As you’ve seen previously, a NULL value can also be returned by some conversion functions if a value is not compatible with the target data type.

You’ll often need to take special steps to deal with NULL. NULL is really a non-value. It is unknown. It isn’t equal to anything, and it’s not unequal to anything. NULL isn’t greater or less than anything. We can’t say anything about what it is, but sometimes we need to work with NULL values. Thankfully, T-SQL provides functions for conversion or replacement of NULL values.

Leave a Reply

Your email address will not be published. Required fields are marked *