本文翻译自:SQL Server Escape an Underscore
How do I escape the underscore character? 如何转义下划线字符?
I am writing something like the following where clause and want to be able to find actual entries with _d at the end. 我正在编写类似以下where子句的内容,并希望能够在末尾找到_d的实际条目。
Where Username Like '%_d'
#1楼
参考:https://stackoom.com/question/1Vt/SQL-Server转义下划线
#2楼
Obviously @Lasse solution is right, but there's another way to solve your problem: T-SQL operator LIKE
defines the optional ESCAPE clause, that lets you declare a charac