Re: What does LIKE '%%' actually do in a WHERE clause?
From: Norman Dunbar <oracle_at_dunbar-it.co.uk>
Date: Fri, 07 Oct 2011 08:52:19 +0100
Message-ID: <4E8EAFB3.7040207_at_dunbar-it.co.uk>
Morning Grant,
Date: Fri, 07 Oct 2011 08:52:19 +0100
Message-ID: <4E8EAFB3.7040207_at_dunbar-it.co.uk>
Morning Grant,
> Maybe I'm mis-interpreting things, but wouldn't LIKE '%' actually be semantically equivalent to IS NOT NULL. That is, for something to be LIKE "anything", it must therefore be known (or more specifically knowable) in order to evaluate its "likeness".
Yes, to all intents and purposes, they are equivalent. I haven't checked
if the CBO considers them to be the same though!
> The %% thing is however, new and interesting to me :)
It had me foxed as well. I'd never seen it until this came up, and I
thought it was a special format of the wildcard - I admit that at first
I thought it was a way of specifying the percent sign - why would they
be looking for a string like '%' came to mind! ;-)
Cheers,
Norm.
-- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767 -- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 07 2011 - 02:52:19 CDT