how to rename a tablename in sql server
how to rename a tablename in sql server
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pankaj PandeyPosted Jul 2, 2013, 5:20 AM
sp_RENAME '[OldTableName]' , '[NewTableName]'
Sanjeeb LenkaPosted Jul 2, 2013, 2:57 AM
EXECUTE sp_rename 'oldTableName' , 'newTableName'
EXECUTE sp_rename 'tb1' , 'tb2'
or you can follow the link given by Riyaz
Riyaz AkhtarPosted Jul 2, 2013, 2:52 AM
http://blog.sqlauthority.com/2008/08/26/sql-server-how-to-rename-a-column-name-or-table-name/