[ACCEPTED]-How to match one character in MySQL in place of %?-mysql
Accepted answer
You want to use an underscore (_
) character. See 1 the documentation here.
_
will match exactly one character :
select * from X where Y like "_s"
0
An easy way you can do it if you know the 3 domain of characters to match:
select * from X where Y like '[a-z]s'
or like this
select * from X where Y like '[a-zA-Z0-9]s'
alternatively 2 you could use the _ (underscore) syntax 1 like follows:
select * from X where Y like '_s'
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.