Handling NULL

Learn how to handle NULL values in T-SQL.

Sometimes a row or an object will not contain any value (NULL), and we must handle such cases properly. For example, we might want to check whether a value is NULL and replace it with another value. T-SQL provides ISNULL() and COALESCE() methods for this purpose.

The ISNULL() function

This function checks whether a value is NULL. If it is NULL, then the function returns the value that is passed as the second ...