> > Summary of MS:
> > When it runs in ANSI mode, null != null.
> > When it runs in backwards compatible mode , null=null.
> Oh, that's interesting, they fixed their bug.
> foo = NULL should produce NULL (*not* true, and *not* false either,
> though it'd act like false in a CASE test).
Hmm. I think I can answer my own question by using the dreaded manual. This
is what Books On-Line for MS has to say:
The result of a comparison operator has the Boolean data type, which has
three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean
data type are known as Boolean expressions.
Unlike other SQL Server data types, a Boolean data type cannot be specified
as the data type of a table column or variable, and cannot be returned in a
When SET ANSI_NULLS is ON, an operator that has one or two NULL expressions
returns UNKNOWN. When SET ANSI_NULLS is OFF, the same rules apply, except an
equals operator returns TRUE if both expressions are NULL. For example, NULL
= NULL returns TRUE if SET ANSI_NULLS is OFF.
a) I can't check it :-)
b) It does return UNKNOWN (NULL?) for <anything>=NULL
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2000-08-03 14:22:37|
|Subject: Re: comparing rows|
|Previous:||From: Tom Lane||Date: 2000-08-03 14:07:24|
|Subject: Re: comparing rows |