Re: Retrieving NULL records

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Retrieving NULL records
Дата
Msg-id 18569.1059457275@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Retrieving NULL records  ("psql novice" <psql_novice@operamail.com>)
Список pgsql-novice
"psql novice" <psql_novice@operamail.com> writes:
> stock=> select * from stock where qty = NULL;

The correct incantation is

 select * from stock where qty IS NULL;

Ordinary comparisons involving NULL always fail (or more accurately,
return NULL).  You have to use the special "is null" operator instead.

            regards, tom lane

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

Предыдущее
От: "psql novice"
Дата:
Сообщение: Retrieving NULL records
Следующее
От:
Дата:
Сообщение: Re: Retrieving NULL records