There are two ways to escape underscore in SQL Server: square brackets and specifying escape character
SELECT * FROM TABLE1 WHERE FIELD1 LIKE '%\_%' ESCAPE '\'or
SELECT * FROM TABLE1 WHERE FIELD1 LIKE '%[_]%'
No comments:
Post a Comment