From: | Magnus Hagander <mha(at)sollentuna(dot)net> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: comparing rows |
Date: | 2000-08-03 14:10:06 |
Message-ID: | 215896B6B5E1CF11BC5600805FFEA82103D97AA9@sirius.edu.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > 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
result set.
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.
"
So apparantly:
a) I can't check it :-)
b) It does return UNKNOWN (NULL?) for <anything>=NULL
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-08-03 14:22:37 | Re: comparing rows |
Previous Message | Tom Lane | 2000-08-03 14:07:24 | Re: comparing rows |