|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Joerg Bruehe (Joerg.Bruehe
Sun.COM)
Date: Tue Dec 29 2009 - 03:27:26 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.Bruehe
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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]