SQL ISNULL Functions

SQL ISNULL()

Look at the following "Products" table:

Suppose that the "UnitsOnOrder" column is optional, and may contain NULL values.

Look at the following SELECT statement:

In the example above, if any of the "UnitsOnOrder" values are NULL, the result will be NULL.

Example

The SQL Server ISNULL()arrow-up-right function lets you return an alternative value when an expression is NULL:

Last updated