| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Implementation of boolean types.
NULL is not a logical value and UNKNOWN is. Look up the truth tables
in any SQL book.
Q: Now what is the first and most important rule of NULLs? A: NULLs propagate in computations!
That means we should have these rules for Boolean types:
NULL AND TRUE = NULL
NULL AND FALSE = NULL
NULL AND NULL = NULL
NULL OR TRUE = NULL
NULL OR FALSE = NULL
NULL OR NULL = NULL
NOT NULL= NULL -- valid but really weird looking, unh?
However, in 3VL we have these rules
UNKNOWN AND TRUE = UNKNOWN
UNKNOWN AND FALSE = FALSE <== opps! not the same as NULL
UNKNOWN AND UNKNOWN = UNKNOWN
UNKNOWN OR TRUE = TRUE <== opps! not the same as NULL
UNKNOWN OR FALSE = UNKNOWN
UNKNOWN OR UNKNOWN = UNKNOWN
NOT UNKNOWN = UNKNOWN
So, which of the three values does a NULL map to? The results of
logical expressions now depend on the order of execution and
substitution of UNNOWN and NULL
Received on Thu Jul 14 2005 - 09:17:39 CDT
![]() |
![]() |