Beginner

338. IS NULL

Learn how to identify records where a column contains NULL.

📘 Lesson 338 of 728 ⏱ 8 min 🎯 Beginner

IS NULL is a SQL condition used to determine whether an expression contains a NULL value.

Finding missing values is a fundamental part of data-quality analysis and reporting.

Find customers who do not have an email address.

SQL
SELECT
    CustomerID,
    CustomerName
FROM Customers
WHERE Email IS NULL;

IS NULL is used in data-quality checks, missing-value analysis, customer reporting, and validation.

  • IS NULL checks for missing values.
  • It is the correct way to test NULL.
  • It can be used in WHERE conditions.
  • It helps identify incomplete records.
  • NULL is different from an empty string.
How do you check for NULL?

Use the IS NULL condition.

Why not use = NULL?

NULL represents an unknown value, so normal equality comparison does not work as expected.

Have you finished this lesson?

Introduction to SQL – All Lessons