From: SPAMBLOCK.Maxwell_Smart@ThePentagon.com.SPAMBLOCK (Brian Tkatch)
Newsgroups: comp.databases.oracle.server
Subject: Re: select blabla where xy = null (8i)
Date: Wed, 08 Aug 2001 16:41:47 GMT
Organization: Altopia Corp. - Usenet Access - http://www.altopia.com
Lines: 24
Message-ID: <3b716a9a.6664671@news.alt.net>
References: <9kro2t$81c$1@rex.ip-plus.net>
X-Newsreader: Forte Free Agent 1.11/32.235


On Wed, 8 Aug 2001 18:06:51 +0200, "Peter Jenny"
<peter.jenny@cedes.com> wrote:

>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
>
>

NULL does not mean nothing. It means UNKNOWN. Oracle, therefore, does
not know if the value equals Y or not, and thus ignores the record.

Any comparison with NULL results in NULL. An unworkable value. To deal
with NULLs, there is the IS NULL keywords.

Brian

