Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Char vs Varchar2 and NULL
>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