Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to change table Name in sql server 2012 ?
Posted

Just use the stored procedure that already exists.
SQL
sp_rename 'old_table_name', 'new_table_name'
 
Share this answer
 
Hello,

You can use sp_rename. Example
SQL
EXEC sp_rename 'Sales.SalesTerritory', 'SalesTerr';

More info is available here[^].

Regards,
 
Share this answer
 
you have to use the below query statement to rename your table in sql server 2012

sp_rename 'OldTableName', 'NewTableName'

Hope this help..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900