| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Char vs Varchar2 and NULL
On 9 Sep 1998 02:37:22 GMT, jpmakar_at_aol.com (Jpmakar) 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.
Of course the expression IF NULL != NULL THEN will allways evaluate to FALSE also.
However, there is an exceptions in Oracle's SQL where one NULL value will be equal to another NULL: in a DECODE function!
Here is an example:
SQL> SELECT DECODE(NULL,NULL,'NULL is equal to NULL',
2 'NULL isn''t equal to NULL')3 FROM dual;
DECODE(NULL,NULL,'NUL
SQL>
Regards,
--
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)
![]() |
![]() |