Re: Retrieving NULL records - Mailing list pgsql-novice

From Mel Jamero
Subject Re: Retrieving NULL records
Date
Msg-id 000601c355c3$70a6a920$1b06a8c0@CMPMEL
Whole thread Raw
In response to Re: Retrieving NULL records  (<email@juergen-cappel.de>)
Responses Re: Retrieving NULL records
List pgsql-novice
it is now..

i had to port lots of our old C applications when i upgraded to a newer
postgres.

-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of
email@juergen-cappel.de
Sent: Tuesday, July 29, 2003 2:40 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Retrieving NULL records



Shouldn't  = NULL  be considered a syntax error ?


Tom Lane <tgl@sss.pgh.pa.us> schrieb am 29.07.2003, 07:41:15:
> "psql novice"  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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


pgsql-novice by date:

Previous
From: Harry Broomhall
Date:
Subject: Re: diff between two timestamps.
Next
From: "Mel Jamero"
Date:
Subject: FW: Retrieving NULL records