title: What is the advantage of using sp_rename to rename a SQL table?
body: <p>I have a sql table in sql server 2012 that I need to rename. I know in other database systems a way of executing this is the following:</p>
  
  <pre><code>ALTER TABLE table_name
    RENAME TO new_table_name;
  </code></pre>
  
  <p>However, it seems SQL Server requires different syntax. From SQL Management Studio I renamed the table in the Design View and right clicked to Generate Change Script, and it produced the following:</p>
  
  <pre><code>BEGIN TRANSACTION
  GO
  EXECUTE sp_rename N'table_name', N'new_table_name', 'OBJECT' 
  GO
  ALTER TABLE new_table_name SET (LOCK_ESCALATION = TABLE)
  GO
  COMMIT
  </code></pre>
  
  <p>Is using <a href="http://technet.microsoft.com/en-us/library/ms188351.aspx" rel="noreferrer">sp_rename</a> the best practice for renaming?</p>
  
  <p>Also there is an additional line it generated to set the lock_esclation = table. Is this required?</p>