Subject Re: [firebird-support] Re: seems bug : Field accepts NULL Values (empty string) even if it is defined w
Author Dimitry Sibiryakov
On 16 Mar 2004 at 14:37, bjonessb wrote:

>This is not a "unique" feature. Every respectable DBMS uses this
>standard.

:-) I don't respect Oracle much, too. Speed is the only its' good
feature.

>select * from table where cola = colb
>select * from table where cola <> colb
>
>Both of these statements will return zero rows. Since null is not a
>value, equality and inequality can not be determined.

I'd like to mention here that SQL uses ternary boolean logic, not
binary. Among TRUE and FALSE there is also UNKNOWN. And any
comparsion with NULL results in UNKNOWN as well as the most logical
operations. For example:

NOT UNKNOWN = UNKNOWN
TRUE AND UNKNOWN = UNKNOWN
FALSE AND UNKNOWN = FALSE
TRUE OR UNKNOWN = TRUE
FALSE OR UNKNOWN = UNKNOWN

SY, Dimitry Sibiryakov.