Re: What does LIKE '%%' actually do in a WHERE clause?

  • From: Norman Dunbar <oracle@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 07 Oct 2011 08:52:19 +0100

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
--
//www.freelists.org/webpage/oracle-l


Other related posts: