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.
The value substituted for NULL must be the same datatype as the expression being evaluated.
In the above example, MiddleName is a varchar, so the replacement value could not be numeric.
In addition, you'll need to choose a value that will not appear in the data as a regular value.
The NULLIF function allows you to return NULL under certain conditions.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.