<p>How do I escape the underscore character?</p>

<p>I am writing something like the following where clause and want to be able to find actual entries with _d at the end.</p>

<pre><code>Where Username Like '%_d'
</code></pre>

T-SQL Reference for LIKE
:
You can use the wildcard pattern matching characters as literal characters. To use a wildcard character as a literal character, enclose the wildcard character in brackets. The following table shows several examples of using the LIKE keyword and the [ ] wildcard characters.
For your case:
```
```
... LIKE '%[_]d'
```
```