-2

How to search for the underscore in a column for SQL?

I tried:

select * from xxx where xxx like '%_%'; and select * from xxx where xxx like '%$_%';

But that doesn't work as expected. How do I escape underscore in SQL LIKE Operator?

1 Answers1

0

Try this:

SELECT * FROM xxx WHERE xxx LIKE '%[_]d'

Park
  • 2,446
  • 1
  • 16
  • 25