Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: select blabla where xy = null (8i)

Re: select blabla where xy = null (8i)

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 8 Aug 2001 18:16:36 +0200
Message-ID: <997287399.16299.0.pluto.d4ee154e@news.demon.nl>

"Peter Jenny" <peter.jenny_at_cedes.com> wrote in message news:9kro2t$81c$1_at_rex.ip-plus.net...
> Hello
>
> why is this sql-statement not working ?
> select count(*) from anlage where pr_Anleitung = null
> I know I've got entries with null, but the result is: 0
>
> And why does
> select count(*) from anlage where pr_Anleitung <> 'Y'
> not select the entries with pr_Anleitung = null ?
>
> Thanks Peter
>
>

The correct syntax is
pr_Anleitung IS NULL (not =, as NULL doesn't compare to anything). Sql comparisons have three possible answers : true, false, null

please verify this in your sql reference manual

Regards,

Sybrand Bakker, Senior Oracle DBA Received on Wed Aug 08 2001 - 11:16:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US