SQL IS NULL Operator: To check for empty values (NULL values) in a database table column, we use the SQL IS NULL operator.
SQL IS NULL Operator
To check for empty values (NULL values) in a database table column, we use the SQL IS NULL operator. This is a logical operator that works as follows:
What Is NULL?
- NULL in SQL means that the data is missing or unknown.
- It shows that a field was not filled in or that the value does not apply.
- A NULL value is not the same as a zero value or blank spaces.
— 1. It is used to get details of any table who don’t have any values or specified as null values (1st query).
— 2. You can also use IS NOT NULL to get opposite result of the IS NULL value (2nd query). Click for more!
SQL Example 1:
SELECT *
FROM customers
WHERE phone IS NULL;

SQL Example 2:
SELECT *
FROM customers
WHERE phone IS NOT NULL;

Watch Video!
Next Post >> #2.10) ORDER BY Clause
<<Previous Post #2.8) SQL REGEXP Operator