Beginner

339. IS NOT NULL

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

📘 Lesson 339 of 728 ⏱ 8 min 🎯 Beginner

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

Analysts often need to work only with records that contain required information.

Find customers who have provided an email address.

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

IS NOT NULL is useful for validation, reporting, filtering, and preparing complete datasets.

  • IS NOT NULL checks for available values.
  • It filters out NULL records.
  • It is useful for data-quality checks.
  • It can be combined with other conditions.
  • It does not necessarily exclude empty strings.
What does IS NOT NULL do?

It returns records where the specified expression contains a non-NULL value.

Is an empty string always the same as NULL?

No. NULL represents missing or unknown information, while an empty string is a string value with no characters.

Have you finished this lesson?

Introduction to SQL – All Lessons