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: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Wed, 9 Sep 1998 19:17:43 +0200
Message-ID: <6t6d5a$gqd$1@newton.a2000.nl>


>I am told but have not checked, that
>IF NULL = NULL THEN
>will always evaluate to false

Indeed. When in doubt think of it as 'undefined' or 'X'. Here, the value of unkown X would set the result:

    ( null and true ) = ( X and true ) = X = null     ( null or false ) = ( X or false ) = X = null

But in the next two examples, it would not matter what value X has:

    ( null or true ) = ( X or true ) = true     ( null and false ) = ( X and false ) = false

Well, when evaluating ( null = null ), you'd need to think of ( X = Y ).

Arjan. Received on Wed Sep 09 1998 - 12:17:43 CDT

Original text of this message

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