Re:Three-Valued Logic
by cwyers on Friday December 15, 2017 @02:06PM
(#15934179)
Why would NULL equal itself? You're basically asking for SQL to special-case the Boolean logic so that if a null value is compared to itself it returns true. Who needs that?
[ Parent
| on HN ]
Re:Three-Valued Logic
by lifepillar on Friday December 15, 2017 @03:44PM
(#15934932)
If you assume that NULL is a placeholder for a value that exists, you must require the basic property that A=A be true, even when A is NULL, because any value equals itself. This does not mean that NULL=NULL should always be true. So, this is just to point out one of the many examples of SQL being incompatible with a "value existent, but unknown" semantics. NULLs in SQL are quite a mess.