0

I want to check whether a column starts with "%". Normally if I were to search for another character I would do this like code below but this doesn't work when searching for "%".

SELECT *
FROM `table`
WHERE `column` LIKE 'anothercharacter%'

Thanks.

dialex
  • 23
  • 2

1 Answers1

0

You can try this

SELECT *
FROM `table`
WHERE column LIKE 'anothercharacter%[%]%'

OR

WHERE column LIKE '%\%%' ESCAPE '\'
Nitin Dhomse
  • 2,524
  • 1
  • 12
  • 24