Re: '= NULL' is not the same as 'IS NULL'

Поиск
Список
Период
Сортировка
От Mark Morgan Lloyd
Тема Re: '= NULL' is not the same as 'IS NULL'
Дата
Msg-id 44FF3252.8F6A978B@telemetry.co.uk
обсуждение исходный текст
Ответ на '= NULL' is not the same as 'IS NULL'  (Geert Janssens <info@kobaltwit.be>)
Ответы Re: '= NULL' is not the same as 'IS NULL'  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-odbc
Geert Janssens wrote:

> I tried this query directly in phpPgSQL, and indeed it returns no results. On
> the other hand, if I modify "imgname" = NULL to "imgname" IS NULL, the query
> works fine.
[...]
> Has anybody else stumbled upon this issue ?

I'm afraid so, in Joe Celko's "SQL for Smarties" book, after which I simply
accepted that that was the way SQL worked. He also comments on the IS TRUE etc.
form which I see PostgreSQL now supports, also in the relevant section of the
manual I see IS DISTINCT FROM which might help.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: v08.02.0100 uploaded
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: '= NULL' is not the same as 'IS NULL'