user6185827
user6185827

Reputation: 41

How do I SELECT LIKE '%' in mysql

I want to get all rows which consists of '%' in there

For example

|column A|column B|
| John | 23%45|
| Smith | 99 |
| Anne | 45 |

output:

|column A|column B|
| John | 23%45|

Upvotes: 0

Views: 48

Answers (1)

Kld
Kld

Reputation: 7068

You can skip it as any other other special character with a \

SELECT * FROM `MyTable` WHERE MyColumn Like "%\%%"

Upvotes: 2

Related Questions