Conceptual
Login

Three-Valued Logic and NULL Handling in SQL

SQL's treatment of NULL as unknown, which turns Boolean logic into a three-valued logic of true, false, and unknown. Predicates involving NULL can yield unknown rather than true or false, so different engines' handling of NULL is a frequent source of semantic disagreement.

Questions this Concept answers

  • Why does `WHERE price = NULL` never match a row?