title: SQL Server - Compare int values in a select clause
body: <p>This is what I thought would be a simple select clause, however the following is giving me grief! I am using SQL Server 2008.</p>
  
  <p>Basically I want to compare two integer values and return the boolean result in the select clause. Here is a simple example:</p>
  
  <pre><code>DECLARE @A INT
  DECLARE @B INT
  SET @A = 1
  SET @B = 2
  
  SELECT @A = @B
  </code></pre>
  
  <p>Currently the only output is "Command(s) completed successfully."
  Where I reasonably believe it is assigning @A to @B.</p>
  
  <p>I thought this would be simple but have not been able to achieve this.</p>
  
  <p>Any help would be great! Thanks</p>