title: SQL query where a column name contains &
body: <p>I have a SQL Server 2008 database, with a column named <code>ES&amp;D</code>. I want to query based on that column like this:</p>
  
  <pre><code>SELECT ES&amp;D FROM myDB
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>SELECT * FROM myDB WHERE ES&amp;D=1
  </code></pre>
  
  <p>But I get the following error (I'm using SQL Server Management Studio to write queries):</p>
  
  <blockquote>
    <p>Msg 207, Level 16, State 1, Line 1<br>
    Invalid column name 'ES'.<br>
    Msg 207, Level 16, State 1, Line 1<br>
    Invalid column name 'D'.</p>
  </blockquote>
  
  <p>Is there any way to escape the <code>&amp;</code> in the column name, such that SQL treats it literally?</p>