July 2010
Intermediate to advanced
840 pages
16h 33m
English
George Boole developed two-valued logic and attached his name to Boolean algebra forever (Boole 1854). This is not the only possible system, but it is the one that works best with a binary (two-state) computer and with a lot of mathematics. SQL has three-valued logic: TRUE, FALSE, and UNKNOWN. The UNKNOWN value results from using NULLs in comparisons and other predicates, but UNKNOWN is a logical value and not the same as a NULL, which is a data value marker. That is why you have to say (x IS [NOT] NULL) in SQL and not use (x = NULL) instead. Table 6.1 shows the tables for the three operators that come with SQL.
x NOT ================== TRUE FALSE UNK UNK FALSE TRUE AND | TRUE UNK FALSE ============================= ... |
Read now
Unlock full access