title: How INT database field gets compared to VARCHAR type
body: <p>I have the following stored procedure, not writing the complete stored procedure but some of it is: </p>
  
  <pre><code>@course int = null,
      SET @query = @query + 'Where course_id='+ cast(@course as varchar)
  </code></pre>
  
  <p>I want to know when I have converted the @course as the VARCHAR type while my <code>course_id</code> in the database is of INT type - how the comparison takes place?</p>