Re: selecting all records where a column is null - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: selecting all records where a column is null
Date
Msg-id 3D12318E.8040305@mmrd.com
Whole thread Raw
In response to selecting all records where a column is null  ("Elmshauser, Erik" <erike@pbgnw.com>)
List 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 by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Serious Crash last Friday
Next
From: Manfred Koizar
Date:
Subject: Re: Yet another "Why won't PostgreSQL use my index?"