Much Ado about nothing

From: David Cressey <david_at_dcressey.com>
Date: Sun, 04 Mar 2001 14:30:01 GMT
Message-ID: <Jjso6.36185$2X4.130080_at_petpeeve.ziplink.net>


Here's another post in this series about NULLS. This is intended as "theory lite".

Every occurrence of an SQL NULL can be construed as a consequence of an outer join. Well, perhaps that's too broad, since some people use the NULL to mean something other than the pure absence of value. For example some people use NULL in the MIDDLE_INITIAL column to indicate that this person has no middle initial, while others use it to indicate that the middle initial was never entered into the system. And some people are confused about what they are indicating.

Whenever you see an SQL NULL, try to imagine an outer join that could have resulted in this NULL. If it's an "absence of value" marker, as all NULLS should be, you'll find an outer join somewhere.

Even the "no middle initial" case can be construed as an outer join between "persons with names" and "possible middle initials".

--
Regards,
    David Cressey
    www.dcressey.com
Received on Sun Mar 04 2001 - 15:30:01 CET

Original text of this message