Beginner

121. NULL Value

Understand what NULL means in SQL and why it is different from zero, blank text, or an empty value.

📘 Lesson 121 of 728 ⏱ 8 min 🎯 Beginner

NULL represents missing, unknown, unavailable, or not applicable information in a database. NULL is not the same as zero, an empty string, or a normal value.

NULL values are common in real-world business data. Understanding them is essential because normal comparison operators do not work with NULL in the same way they work with regular values.

If an employee has not yet provided a phone number, the PhoneNumber column may contain NULL.

SQL
SELECT
    EmployeeName,
    PhoneNumber
FROM Employees
WHERE PhoneNumber IS NULL;

NULL values appear in customer records, employee data, financial transactions, addresses, optional fields, and incomplete business records.

  • NULL represents missing or unknown information.
  • NULL is not equal to zero.
  • NULL is not the same as an empty string.
  • Use IS NULL to check for NULL.
  • Use IS NOT NULL to find available values.
What is NULL in SQL?

NULL represents missing, unknown, unavailable, or not applicable information.

Is NULL equal to zero?

No. NULL represents the absence or unknown state of a value, while zero is an actual numeric value.

Have you finished this lesson?

Introduction to SQL – All Lessons