title: SQL Server transaction not committing
body: <p>I have a SQL Server transaction which adds a column to a table, and then it adds some value to that column. It runs perfectly, but it doesn't commit the changes. </p>
  
  <p>I checked with <code>@@trancount</code>, and it's value is 1 after running the query. </p>
  
  <p>What is wrong with the transaction?</p>
  
  <p>Thanks!</p>
  
  <pre><code>BEGIN TRANSACTION
      ALTER TABLE Table
          ADD ColumnName VARCHAR(200) NULL;
      GO
  
      BEGIN TRY
          UPDATE ColumnName 
          SET ColumnName = 'some value'
  
          COMMIT TRANSACTION
      END TRY
      BEGIN CATCH
          ROLLBACK TRANSACTION;
      END CATCH;
  </code></pre>