RE: comparing rows
От | Magnus Hagander |
---|---|
Тема | RE: comparing rows |
Дата | |
Msg-id | 215896B6B5E1CF11BC5600805FFEA82103D97AA9@sirius.edu.sollentuna.se обсуждение исходный текст |
Ответ на | comparing rows (Tatsuo Ishii <t-ishii@sra.co.jp>) |
Список | 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
В списке pgsql-hackers по дате отправления: