| From: | "Mel Jamero" <mel(at)gmanmi(dot)tv> |
|---|---|
| To: | <pgsql-novice(at)postgresql(dot)org> |
| Subject: | FW: Retrieving NULL records |
| Date: | 2003-07-29 11:24:38 |
| Message-ID: | 000801c355c3$fffc62e0$1b06a8c0@CMPMEL |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
oooopps sorry, i misunderstood. it's a logical error, not a syntax error.
just like in some programming languages.
-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org]On Behalf Of
email(at)juergen-cappel(dot)de
Sent: Tuesday, July 29, 2003 2:40 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Retrieving NULL records
Shouldn't = NULL be considered a syntax error ?
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)postgresql(dot)org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-07-29 14:29:43 | Re: help: now() + N is now failing! |
| Previous Message | Nabil Sayegh | 2003-07-29 11:23:01 | Re: Retrieving NULL records |