IS NOT NULL checks whether a column or expression contains a non-NULL value.
Analysts often need to work only with complete records or identify which records contain required information.
Find employees who have a manager assigned.
SELECT
EmployeeName,
ManagerID
FROM Employees
WHERE ManagerID IS NOT NULL;
IS NOT NULL is useful for data completeness checks, reporting, validation, and filtering usable records.
- IS NOT NULL identifies non-NULL values.
- It is the opposite of IS NULL.
- It is useful for completeness checks.
- It does not treat empty strings as NULL automatically.
- It is commonly used in data-quality analysis.
What does IS NOT NULL do?
It returns rows where the specified expression contains a non-NULL value.
Why use IS NOT NULL?
It helps identify records where required or available information has been populated.