SQL syntax, at least what I'm familiar with offhand, makes you explicitly say things such as WHERE (a.cola = b.colb OR a.cola IS NULL OR b.colb IS NULL) or similar syntax but with distinct variations for joining 'left' and 'right' tables on an expression (which, BTW, can be noticeably slower than the WHERE version, depending on which database you're using).
Re:Typed nils in Go 2
by marcus_holmes on Friday August 11, 2017 @02:43AM
(#14987167)
I think they're referring to outer-joined tables.
SELECT a.id, b.name FROM a LEFT JOIN b ON a.id = b.id
If you get a NULL in the name field, you don't know if that's because there's no record in b for that id, or if there is a record in b for that id but it has a NULL name value. Sometimes that difference will be important.
While admittedly this could be seen as a mistake in SQL, you can differentiate by looking at whether b.id is NULL or not.
Re:Typed nils in Go 2
by marcus_holmes on Friday August 11, 2017 @08:44AM
(#14989051)
true, but that's not the point the OP was making, I think :)
I avoid the word "empty" when referring to anything SQL related, as it is ambiguous in three value logic.