SQL IS NULL Keyword
The IS NULL condition is used to check whether a column contains a NULL value. This is useful when identifying records that are missing data in certain fields.
SQL IS NULL Syntax
SQL
x
1
SELECT column1, column2, ...
2
FROM table_name
3
WHERE column_name IS NULL;
SQL IS NULL Patients with No dob Example
This query returns all patients who don’t have a birth date (dob
) recorded:
SQL
1
1
SELECT patient_id, first_name, last_name
2
FROM Patients
3
WHERE dob IS NULL;
