Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to test to VARCHAR2's for equality EFFICIENTLY ?
johng_at_mm.nospam.com wrote:
> Inline comment:
> "mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote:
>
> >close....
> >
> >'x' != 'x' is false, returns 0 -- ok
> >'x' != 'y' is true, return 1 -- ok
> >null != null is null, returns 1 -- ok
> >'x' != null is also null, returns 1 -- not ok
> >
>
> Sorry but
> 'x' != null ( By the way that is a bad comparison operator when using
> NULL, it should be 'x' is not NULL) is TRUE and should return a 1 -
> Nothing is equal to null, so x is not equal to null either..
Don't you think that he knows what he needs his function to return better than you do? If he just wanted to accept the normal behavior of the three-valued logic operations, we wouldn't be having this thread, would we?
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service New Rate! $9.95/Month 50GBReceived on Fri Nov 21 2003 - 15:11:14 CST