Showing posts with label Rename a Column Name or Table Name SQL Server. Show all posts
Showing posts with label Rename a Column Name or Table Name SQL Server. Show all posts

Friday, 28 June 2013

SQL SERVER – How to Rename a Column Name or Table Name

The script for renaming any column :
sp_RENAME 'TableName.[OldColumnName]' '[NewColumnName]''COLUMN'
The script for renaming any object (table, sp etc) :
sp_RENAME '[OldTableName]' '[NewTableName]'