Unknown values and NULL
Comparison operators
But what about NULL = NULL?
Each occurrence of NULL represents a different unknown.
E.g., consider this table:
birthday
name |
birth_date |
Richard Feynman |
May 11, 1918 |
Genghis Khan |
NULL |
Donald Knuth |
January 10, 1938 |
Pope Boniface III |
NULL |
- Pope Boniface III and Genghis Khan definitely have birthdates.
- But those dates are unknown.
- The birthdates are probably different, since they lived 600 years apart.
SQL does group different unknowns together sometimes, but in almost
all situations, different NULLs are different.
|