Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

IS NULL

IS NULL

The IS NULL command is employed to check for empty values (NULL values). The following SQL enumerates all customers with a NULL value in the “Address” field:

Example

SELECT CustomerName, ContactName, Address
FROM Customers
WHERE Address IS NULL;

 

Please note that a NULL value differs from a zero value or a field containing spaces. A NULL value indicates that the field was left blank during record creation.

Tip: It’s recommended to use IS NULL to search for NULL values.