Purpose: Tests for NULL values in a column.
Syntax
column_name IS NULL
or
column_name IS NOT NULL
Example:
SELECT * FROM employees WHERE department_id IS NULL;
Explanation: This retrieves employees who do not belong to any department.
Leave a Reply