On Jul 15, 2010, at 12:25 AM, Simon Slavin wrote: > > On 14 Jul 2010, at 5:13pm, Richard Hipp wrote: > >> Improvements to the IN operator documentation can be found here: >> >> http://www.sqlite.org/draft/lang_expr.html#in_op > > I find that table difficult to understand: you have some mutually > exclusive columns. Could it be replaced by this sequence of four > tests and an 'otherwise' ? > > If the right op is the empty list, then IN = false > else if the left op is NULL, then IN = NULL > else if the right op contains left op, then IN = true > else if the right op contains NULL, then IN = NULL > otherwise IN = false > > Also NOT true = false, NOT false = true, NOT NULL = NULL. > > That should match the source code, so it should be better > documentation. > > By the way, can someone explain why this rule, equivalent to line 4 > of the table, is there: > > else if the right op contains NULL, then IN = NULL > > By the time we've got there we already know that the left op is not > NULL. Why does the handling of a NULL right op require a special > case like that ? We definitely know that the left op is not IN it.
Thread here: http://www.mail-archive.com/sqlite-users@sqlite.org/msg34989.html He can be a tricky guy, NULL. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users