+ 2

how to search for string starts with % itself for example %john , name is started with % itself

13th Mar 2016, 9:15 AM
Gaurav Dwivedi
Gaurav Dwivedi - avatar
2 Answers
+ 1
You can escape wildcards using the ESCAPE statement, e.g. SELECT login FROM users WHERE login LIKE '/%%' ESCAPE '/' The first % is escaped and therefore treated as a literal, while the next one functions as normal. The result is a search for strings that start with the character %.
23rd Jun 2016, 3:31 AM
Adam Dąbrowski
Adam Dąbrowski - avatar
+ 1
your escape slash is inverse
14th Jul 2016, 7:50 PM
manish rawat
manish rawat - avatar