Re: 3 value logic. Why is SQL so special?
From: -CELKO- <jcelko212_at_earthlink.net>
Date: 18 Sep 2006 19:14:59 -0700
Message-ID: <1158632099.603639.26800_at_i3g2000cwc.googlegroups.com>
Date: 18 Sep 2006 19:14:59 -0700
Message-ID: <1158632099.603639.26800_at_i3g2000cwc.googlegroups.com>
>>, what would be the consequences of NULL=NULL being true?
NULL=NULL should not be true. NULL=NULL should not be false. NULL=NULL should not be UNKNOWN. NULL=NULL should be NULL. <<
NULL is a missing *attribute* value; UNKNOWN is a *logical* value. The first rule of NULLs is that they propagate. You can easily set up contradictions that depend on the order evaluation when you have a BOOLEAN data type. All SQLK data types must allow NULLs by definition.
NULL OR TRUE = NULL -- by definition
NULL AND TRUE = NULL -- by definition
This is why we have the <exp> IS [NOT] [TRUE | FALSE |UNKNOWN]
UNKNOWN OR TRUE = TRUE -- by definition
UNKNOWN AND TRUE = UNKNOWN -- by definition