SQL uses three-valued logic: TRUE, FALSE, and UNKNOWN. UNKNOWN occurs when a search condition references at least one NULL and the overall truth cannot be decided. For example, the comparison NULL = 5 is neither TRUE nor FALSE, so it yields UNKNOWN. In filters (WHERE, HAVING, CHECK), rows with UNKNOWN are treated the same way as FALSE and are excluded unless explicitly tested. The SQL standard lets you examine this state with the IS [NOT] UNKNOWN predicate. UNKNOWN is not a literal you can store; boolean columns store NULL to indicate an indeterminate value. Understanding UNKNOWN is essential for predictable NULL handling, constraint design, and complex conditional logic.
NULL, IS NULL, IS TRUE, IS FALSE, Three-valued logic, NULL-safe operators
SQL-92 (formalized in SQL-1999 with IS UNKNOWN predicate)
UNKNOWN is the result of a predicate when SQL cannot evaluate it as TRUE or FALSE, usually because one or more operands are NULL.
Append IS UNKNOWN to the boolean expression, or use IS NOT UNKNOWN when you want TRUE or FALSE only.
They are related but different. NULL is stored data indicating missing information, while UNKNOWN is a runtime logical result produced by evaluating expressions containing NULL.
WHERE and HAVING clauses discard rows whose predicates evaluate to UNKNOWN, treating them like FALSE. Explicitly check for UNKNOWN if you need to keep them.