2 ms·
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
by marcus_holmes 9y ago
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.
- sorkin2 9y agoWhile admittedly this could be seen as a mistake in SQL, you can differentiate by looking at whether b.id is NULL or not.
- marcus_holmes 9y agotrue, but that's not the point the OP was making, I think :)