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: Char vs Varchar2 and NULL

Re: Char vs Varchar2 and NULL

From: C. Broom <broom_at_veenet.value.net>
Date: 10 Sep 1998 09:51:25 -0700
Message-ID: <6t902d$ef2@veenet.value.net>


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 Received on Thu Sep 10 1998 - 11:51:25 CDT

Original text of this message

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