NULL Values

The NULL value represents an empty record. If a field in a table is optional, it means that a record can be entered without specifying a parameter in the optional field. In this case, the record will be added to the table, and the empty field will take on the value NULL.

Important! The NULL value is different from zero or a field containing a space (blank). A field with a NULL value is a field that was left blank when creating a new record.

How to check for NULL values? We cannot filter NULL values using logical operators (=, <, <>). For NULL values, we use the IS NULL or IS NOT NULL parameter.

Formula:

SELECT column1
FROM Table1
WHERE column1 IS NULL;

SELECT column1
FROM Table1
WHERE column1 IS NOT NULL;

The IS NULL operator returns empty values from the table, while the IS NOT NULL operator returns non-empty values.

Interesting article? Share further!

Leave A Comment