title: Adding column to table and then setting value gives error
body: <p>I am pretty new to SQL. I am working with SQL Server 2012. I need to do the following: add a column to an existing table and fill all rows in that column with the same value. To do this, I have come up with the following based on searching online:</p>
  
  <pre><code>ALTER TABLE myTable ADD myNewColumn VARCHAR(50) NULL
  UPDATE myTable SET myNewColumn = 'test'
  </code></pre>
  
  <p>The problem is that in SQL server, I get the following error for the second statement: </p>
  
  <blockquote>
    <p>Invalid column name 'myNewColumn</p>
  </blockquote>
  
  <p>So, my guess is that a new column called <code>myNewColumn</code> wasn't created by the first statement.</p>