Home » SQL & PL/SQL » SQL & PL/SQL » Using Wild charchters in where clause sentence
Using Wild charchters in where clause sentence [message #20358] Thu, 16 May 2002 05:02 Go to next message
LI810
Messages: 25
Registered: February 2002
Junior Member
Hello , please help
which wild char is more effective to use in 'like' clause like "%AA%" or like "__AA___" ?
Re: Using Wild charchters in where clause sentence [message #20364 is a reply to message #20358] Thu, 16 May 2002 12:38 Go to previous messageGo to next message
Su
Messages: 154
Registered: April 2002
Senior Member
It all depends on your requirement and column width. When you give wild character % it represents more than one character where as _ (underscore) represents only one character/position. For example __AA__ (begin and end with two underscores and in between two A's) looks for only string values whose length is 6 characters, and 3rd and 4th positions are only letters A. Where as %AA% looks for a string value which have a couple of consecutive letters A in any position and the string's length is any long. Hope you understand the difference between two now.
Good luck :)
Re: Using Wild charchters in where clause sentence [message #20367 is a reply to message #20364] Fri, 17 May 2002 05:07 Go to previous message
LI810
Messages: 25
Registered: February 2002
Junior Member
Thanks ,but I was asking what is more effective __ or % in the "like" clause
Previous Topic: Re: list of tables
Next Topic: condition in WHERE clause
Goto Forum:
  


Current Time: Wed Apr 24 04:41:33 CDT 2024