On Mon, Sep 17, 2012 at 06:03:12PM -0600, Keith Medcalf scratched on the wall: > > There it is again. What does length(NULL) mean ? Should it be NULL because > > anything derived from "Don't know" is "Don't know" ? Or should it be a non- > > negative integer representing how long the NULL value is ? I may have > > missed > > it, but I don't think the answer is in SQL92. The only solution is not to > > depend on any particular behaviour. > > The result of any operation involving NULL other than IS NULL and > IS NOT NULL must be NULL.
Not true. There are formal rules for three-valued logic (or 3VL) that every database should follow. In 3VL, NULL is treated as "unknown", but there are cases when an operator can take a NULL argument, but still produce a known result. For example, in SQL "NULL OR 1" is 1 (true) and "NULL AND 0" is 0 (false). Arguments about the semantic details of Relational algebra aside, if you treat NULL as "unknown", most of the database operators and functions make sense. http://en.wikipedia.org/wiki/Three-valued_logic -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users