Re: selecting all records where a column is null

Поиск
Список
Период
Сортировка
От Fran Fabrizio
Тема Re: selecting all records where a column is null
Дата
Msg-id 3D12318E.8040305@mmrd.com
обсуждение исходный текст
Ответ на selecting all records where a column is null  ("Elmshauser, Erik" <erike@pbgnw.com>)
Список pgsql-general
Elmshauser, Erik wrote:

>Hi, I am trying to select every record from a table where a specific
>column does not have a value in it yet.  Is there a way to express that
>in a SQL statement?  Here are the few I tried:
>
>select * from table where field;
>select * from table where field = '';
>select * from table where field = NULL;
>
select * from table where field is null;

is rather than =.  Since null is undefined, it's not appropriate to test
for equality to null.

-Fran



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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Serious Crash last Friday
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Yet another "Why won't PostgreSQL use my index?"