Re: Retrieving NULL records - Mailing list pgsql-novice

From
Subject Re: Retrieving NULL records
Date
Msg-id 6312635$10594607333f26167d23d2a4.83384765@config11.schlund.de
Whole thread Raw
In response to Retrieving NULL records  ("psql novice" <psql_novice@operamail.com>)
Responses Re: Retrieving NULL records  ("Mel Jamero" <mel@gmanmi.tv>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Retrieving NULL records
Next
From: "Girish Bajaj"
Date:
Subject: dynamic sql statements and OUT variables