title: Ms Sql Server Compare Numeric column with string value
body: <p>In MS SQL Server, what is the difference between:</p>
  
  <pre><code>select * from Person where Id='7'
  </code></pre>
  
  <p>and</p>
  
  <pre><code>select * from Person where Id=7
  </code></pre>
  
  <p>The two queries returns the same results.</p>
  
  <p>The <strong>Id</strong> type is <strong>int</strong>.</p>
  
  <p>should we not compare int to string?</p>
  
  <p>and when should use one of them?</p>