On 20 Dec 2013, at 4:11am, David Bicking <dbic...@yahoo.com> wrote:

> But isn't NULL and 0 a NULL? So wouldn't it need to evaluate X to determine 
> if it was null, and thus discover it wasn't a valid column name and return an 
> error?

In SQL, where anything can be NULL, binary operation tables must be written out 
with three rows and columns: true, false, and NULL.  And if you do that, you 
find that both "0 AND NULL" and "NULL AND 0" evaluate to 0.

I must put "You can't just see a NULL somewhere in an expression and jump to 
the conclusion that the answer is NULL." somewhere.  It's pretty neat.  Thanks 
for the reminder.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to