Re: comparing rows

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: comparing rows
Дата
Msg-id 3.0.1.32.20000803065253.014e3650@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: comparing rows  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Ответы Re: comparing rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: comparing rows  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
At 01:44 PM 8/3/00 +0000, Thomas Lockhart wrote:
>> Not compatible with the current release of MS SQL/MSDE :-) At least not
>> fully.
>
>The original issue was that "foo = NULL" is *not* a legal SQL92
>statement. 

Ummm...I think this is wrong, and I have Date on my side (I just
checked).  foo = NULL is NULL, just like foo + NULL is NULL.

If foo = NULL is illegal, doesn't this make it rather difficult to
say things like table1.i = table2.i for tables that contain NULLs
in column i?

Oracle allows it, and returns NULL.  Oracle's fairly trustworthy
on low-level standards compliance over things like NULL (not
entirely, though - it treats '' as NULL in the VALUES list of
an INSERT, though not elsewhere, for instance).

NULL = NULL is also perfectly legal, returning NULL.  Before one
gets too excited, NULL <> NULL and NULL < NULL etc all return
NULL, too, along with NULL = <anything> so it's not terribly
useful, which is why IS NULL exists.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: comparing rows
Следующее
От: Don Baccus
Дата:
Сообщение: RE: comparing rows