title: OR Operator Short-circuit in SQL Server
body: <p>I want to consult SQL Server OR short-circuit</p>
  <p>Code:</p>
  <pre><code>DECLARE @tempTable table
      (
          id int
      )
  INSERT @tempTable(id) values(1)
        
  DECLARE @id varchar(10)
  SET @id = 'x'
  SELECT * FROM @tempTable WHERE 1=1 OR id = @id --successfully
  SELECT * FROM @tempTable WHERE @id = 'x' OR id = @id --Exception not Convert 'x' to int
  </code></pre>
  <p>Why? <code>1=1</code> and <code>@id='x'</code> are <code>true</code>.</p>
  <p>SQL Server OR operator : whether the short-circuit function？</p>
  <p>THANKS</p>