Home » SQL & PL/SQL » SQL & PL/SQL » ^ character
^ character [message #333819] Mon, 14 July 2008 09:11 Go to next message
shoaib123
Messages: 118
Registered: December 2007
Location: Chicago
Senior Member

Hi

is anybody help me to understand this '^' meaning in this where clause statement..

 where
   ut.table_name like 'B1^_MA^_%' escape '^'



I do understand the like statement using '%'.. But not sure when it add this '^', what exactly it means ?

Appreaciate your help on this ...
Re: ^ character [message #333820 is a reply to message #333819] Mon, 14 July 2008 09:14 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
It is being used to 'escape' the next character - ie remove all special meaning from it for the LIKE function.
Normally an underscore (_) means any single character when you use LIKE.
By putting the ^ in front, you tell LIKE that you actually want it to find an _ instead.
Re: ^ character [message #333828 is a reply to message #333820] Mon, 14 July 2008 09:23 Go to previous messageGo to next message
shoaib123
Messages: 118
Registered: December 2007
Location: Chicago
Senior Member

So.. this like statement will returns those table name whose name starts with something like this..

B1_MA_


Re: ^ character [message #333835 is a reply to message #333828] Mon, 14 July 2008 09:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
That starts with this, yes.

Regards
Michel
Re: ^ character [message #333899 is a reply to message #333835] Mon, 14 July 2008 15:25 Go to previous message
shoaib123
Messages: 118
Registered: December 2007
Location: Chicago
Senior Member

Thanks Micheal.. Appreciated your time and help..
Previous Topic: How to select Top N th sal by using Join query ? (merged)
Next Topic: SELECT and tablespaces
Goto Forum:
  


Current Time: Mon Dec 05 21:31:48 CST 2016

Total time taken to generate the page: 0.12222 seconds