What are the wildcards used for pattern matching?

_ for single character substitution and % for multi-character substitution

Showing Answers 1 - 7 of 7 Answers

prasuna

  • Nov 18th, 2005
 

For single charecter _

For multiple charecters %

if the charecter is one from this list then []

if the charecter should not contain this means ^(not operator)

  Was this answer useful?  Yes

pujavipin

  • Jun 4th, 2009
 

% = for matching one or more characters.
_ = for matching excatly one character.
[abc]= for matching either 'a' or 'b' or 'c'.
[^abc]= for matching character other than 'a','b'and 'c'.

  Was this answer useful?  Yes

_ for matching single characters
% for matching mutiple characters
[] for matching either characters
[^] for not matching character

eg
Table having a column name then
Name LIKE 'A_' returns the name start with A and only one character after 'A'
Name LIKE 'A%' returns the name starts with A.
Name LIKE '[AB]%' returns the name starts with A OR B
Name LIKE '[^AB]%' returns the name starts with other than A & B

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions