Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query Clarification.
Michel Cadot wrote:
> <cybotto_at_yahoo.com> a écrit dans le message de news: 1130653256.986100.151560_at_g43g2000cwa.googlegroups.com...
> |
> | Comparing NULL = NULL, NULL <> NULL, NULL > NULL, etc. will always
> | result in false ...
> |
>
> This is not true, these conditions return UNKNOWN and not FALSE.
> Oracle works on a trivalue logic.
Just to supplement your otherwise perfect answer, Oracle SQL Reference says "In a DECODE function, Oracle considers two nulls to be equivalent. If expr is null, then Oracle returns the result of the first search that is also null." I think this is an appropriate example (from Oracle 9.2.0.1.0):
SQL> select decode(null, null, 'Null equals null in DECODE') from dual;
DECODE(NULL,NULL,'NULLEQUA
That's one place I find Oracle treats null differently. Another place, not quite related, is that MAXVALUE in range partition definition is greater than null (Ref. J. Lewis "Practical Oracle8i", p.241).
Yong Huang Received on Sun Oct 30 2005 - 09:29:20 CST
![]() |
![]() |