Martijn,

thanks for your excellent mail:

Martijn Tonies wrote:
> [[...]]
> 
> A column can have two states: null or not null. It either has
> data (a value, depending on the datatype), or no data (null),
> which is where <column> IS NULL (has no data) or
> <column> IS NOT NULL (has data) comes into play.

To make it more explicit:
The term "null value" is no proper expression in relational theory.
Values can be compared to each other, and they are equal or not, some of
them even are ordered.
"Null" is no value but a state, signalling "value is unknown".
And of two unknowns you can't even tell whether they are equal or not,
so the result of comparing anything (be it a value or "unknown") to
"unknown" is again "unknown".

That's why logic in SQL is three-valued: true, false, and unknown.


Regards,
Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@sun.com
Sun Microsystems GmbH,   Komturstraße 18a,   D-12099 Berlin
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering     Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to