Beginner

26. IS NULL

Learn how to identify records where a column contains a NULL value.

📘 Lesson 26 of 728 ⏱ 7 min 🎯 Beginner

IS NULL is a SQL condition used to check whether a column contains a NULL value. Because NULL represents an unknown or missing value, SQL requires IS NULL rather than = NULL when checking for missing values.

Identifying missing information is an important part of data-quality analysis. Analysts frequently need to find records where important fields have not been populated.

If some employees do not have a manager assigned, the ManagerID column may contain NULL. IS NULL can identify those employees.

SQL
SELECT
    EmployeeID,
    EmployeeName
FROM Employees
WHERE ManagerID IS NULL;

IS NULL is used for data-quality checks, customer data validation, employee analysis, financial reporting, and missing-data investigations.

  • IS NULL identifies missing values.
  • IS NULL is used inside conditions.
  • IS NULL is different from = NULL.
  • NULL values can affect calculations and comparisons.
  • IS NULL is useful for data-quality analysis.
How do you find NULL values in SQL?

Use the IS NULL condition.

Why can't you normally use = NULL?

NULL represents an unknown value, so SQL uses IS NULL and IS NOT NULL for NULL comparisons.

Have you finished this lesson?

Introduction to SQL – All Lessons