IS NULL is a unary logical operator used in WHERE, HAVING, JOIN, and CASE clauses to filter rows whose value is NULL. NULL represents an unknown or missing value and is never equal to anything, not even another NULL. Because of this tri-valued logic, normal equality comparisons (="" or <>" ") cannot detect NULLs. IS NULL returns TRUE when the operand is NULL, otherwise FALSE. If the operand is the result of a subquery, expression, or aggregate, the same rule applies. IS NULL never returns NULL; it resolves to a boolean that the query engine can use for filtering.Caveats:- NULLs propagate through most expressions, so calculations like price * quantity may return NULL and require IS NULL checks.- Some dialects support optimized null-aware join syntax, but basic IS NULL works everywhere.- IS NULL differs from empty string or zero. In most databases, '' and 0 are actual values, not NULL.
IS NOT NULL, NULL, COALESCE, NVL, NULLIF, DISTINCT, GROUP BY
SQL-92 Standard
IS NULL matches rows where the value is NULL. IS NOT NULL matches rows where the value is anything other than NULL.
Most databases store NULLs inside indexes. Creating an index on the column usually speeds up IS NULL filters, but check your dialect's rules.
Use COUNT(*) with a CASE or COUNT(column) = total - COUNT(column) since COUNT(column) ignores NULLs.
Yes. In grouping operations, all NULLs are placed in the same group, even though NULL = NULL is not true in comparisons.