title: SQL Server error handling pattern
body: <p>I am not an expert on SQl Server. Is this a valid pattern for handling errors in a batch of SELECT, INSERT...in SQl SERVER ?  (I use v.2008)</p>
  
  <pre><code>BEGIN TRANSACTION
      BEGIN TRY
         -- statement 1
         -- statement 2
         -- statement 3
         COMMIT TRANSACTION
      END TRY
  
      BEGIN CATCH
         ROLLBACK TRANSACTION
      END CATCH
  </code></pre>
  
  <p>Thanks</p>