Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Funny comparisions :)
Thomas Kyte wrote:
>
[]
> >
>
> how about
>
> if ( a = b OR (a is null and b is null) )
> then
> -- they are "equal"
> else
> -- they are not
> end if;
>
This is a bit strange for me. Maybe some was changed in recent (or not very so)
versions? I always thinked that
a = b is null if a or b is null
a or b is also null if a or b is null
Maybe I was totally wrong... The secons one seemed to be ok (logic!) --
if b is true, the whole expression should be true whenever a is true/false/null.
But if b is false, the whole one will be the same as a -- true/false/NULL (i.e.
if b is false, and a is null, than (a or b) is also null). Right?
If so, then I just "invented a bicycle", sorry for my stupid "solution" for non-existed problem... And yes, that is worked (surprise ;)!
[]
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
Thanks! Received on Wed Dec 29 1999 - 09:28:28 CST
![]() |
![]() |