Re:Three-Valued Logic
by MarkusWinand on Friday December 15, 2017 @06:54AM
(#15931189)
This is a controversy outside of SQL.
SQL is pretty clear what null is:
> “Every [SQL] data type includes a special value, called the null value,”[0] “that is used to indicate the absence of any data value”[1]
(http://modern-sql.com/concept/null)
[0] SQL:2011-1: §4.4.2 [1] SQL:2011-1: §3.1.1.12
It is known to be one of the major controversies because originally NULL means the absence of a value which entails that it is not a value. Hence, if there are no values, then we cannot do any operations. Yet, for whatever reason (avoiding exceptions etc.) expressions with NULL need to be evaluated and hence NULL is treated as a value. So we get a problem: NULL is not a value AND NULL is a value. There are different views on this problem and the solution implemented in SQL (and three-valued logic) is probably not the best one.