|
Just to throw something into the fray that is really a non-winning
attempt, but I'll do it anyway!
NULL - it is not really a value, it is an attribute. That's why the null
indicators make some sense - it's either true or false that the value of
something is known. Not that this makes things easy.
When columns are nullable, the row in storage has a bit array (I think -
maybe a byte array) up to 8000 long - the maximum number of columns in a
record.
There is no test in SQL for FIELD = NULL - the test is FIELD IS NULL.
The COALESCE function is always described as "...returning the 1st
non-null expression among it's arguments..." I suggest that "non" is a test
for "is", not "equals".
I really do think that if we remember this distinction, that things can be
a little less confusing. As Charles says, you can't say a comparison is
true or false when a column could BE NULL in some rows.
The trouble with this position is, even IBM in its documentation talks
about a column having the NULL value - I think! Even people in this list
find this to be common usage.
Anyhow, there I sit - ready to to be knocked off my NULL position on the
fence into either the TRUE or FALSE side - hope it's greener, wherever I
land!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.