IS NULL vs = NULL

Published July 26, 2025 By Sai Sree Ram Gundepudi

IS NULL vs = NULL

In SQL, NULL represents a missing or undefined value. You cannot use = NULL.

Incorrect:

SELECT * FROM employees WHERE commission_pct = NULL; -- This returns no rows

Correct:

SELECT * FROM employees WHERE commission_pct IS NULL;

Use IS NOT NULL to check for non-null values.

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article