title: Add column and update it within a transaction
body: <p>I'm trying to add and update a column. This code is within a transaction.</p>
  
  <pre><code>ALTER TABLE [Foo] ADD SomeId INT NULL
  UPDATE [Foo] SET SomeId = 1
  ALTER TABLE [Foo] ALTER COLUMN SomeId INT NOT NULL
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Msg 207, Level 16, State 1, Line 5 Invalid column name 'SomeId'.</p>
  </blockquote>
  
  <p>I tried adding a <code>GO</code> statement after the first<code>ALTER TABLE</code>, but apparently that's invalid inside a transaction. How can I make this work inside a transaction?</p>