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: Funny comparisions :)

Re: Funny comparisions :)

From: Michael Ju. Tokarev <mjt_at_tls.msk.ru>
Date: Wed, 29 Dec 1999 18:28:28 +0300
Message-ID: <386A289C.1C01A368@tls.msk.ru>


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

Original text of this message

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