Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Char vs Varchar2 and NULL
Here's an interesting one for you:
SELECT COUNT(*) FROM TABLE_A; Count(*)
SELECT COUNT(*) FROM TABLE_A
WHERE NULL = NULL;
Count(*)
SELECT COUNT(*) FROM TABLE_A
WHERE NULL IS NULL;
Count(*)
In article <6t902d$ef2_at_veenet.value.net>,
broom_at_veenet.value.net (C. Broom) wrote:
> In article <1998090902372200.WAA05083_at_ladder01.news.aol.com>,
> Jpmakar <jpmakar_at_aol.com> wrote:
> >Beware the Oracle NULL. It does not mean 'NULL', it means 'undefined'. I am
> >told but have not checked, that
> >
> >IF NULL = NULL THEN
> >
> >will always evaluate to false for the above reason.
>
> The word 'NULL' in a database means 'undefined' value. If my age is
> set to NULL and your age is also set to NULL then it makes sense that
> my age should not be considered to be equal to your age.
> In other words, neither my age nor yours is known so no statement can
> be made about their equality or lack thereof.
>
> In a database NULL = NULL is never true,
> just as NULL != NULL is never true.
>
> In C we can code '' to be a null string, but that is not at all
> the same as a database NULL.
>
> Cecil
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Sep 11 1998 - 07:39:32 CDT