title: Renaming an existing column without downtime
body: <p>I want to rename a column in a table. I see two approaches</p>
  
  <ol>
  <li><p>Use <code>sp_rename()</code> and  modify stored procedures to refer to new name.</p></li>
  <li><p>Create new column, copy data from old column to new column, modify stored procedure etc. to refer to new column, eventually drop old column.</p></li>
  </ol>
  
  <p>We can't use #1 as renaming column might leave stored procedures broken and we cannot afford any downtime.<br>
  If we go with #2, there is possibility that both old and new columns would co-exist for sometime after the data is copied over from old to new column but before the stored procedures deployed to use the new column.</p>
  
  <p>Is there any way to keep the new column in sync with any updates/insert/deletes done to old column? </p>
  
  <ol>
  <li>Can the <code>AFTER</code> triggers help here? But triggers usually increase the transaction time, so may not be a favorable solution.</li>
  <li>Can I replicate data between two columns of the same table?</li>
  <li>Any other possible solutions?</li>
  </ol>
  
  <p>Also does sp_rename() cleanly updates all the references to the column - like stored procedures, functions, indexes etc?</p>