Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: select blabla where xy = null (8i)
On Wed, 8 Aug 2001 18:06:51 +0200, "Peter Jenny" <peter.jenny_at_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 Received on Wed Aug 08 2001 - 11:41:47 CDT