Monday, December 18, 2017

How to rename table name in sql server

To rename a table in sql server, you just need a single line of code mentioned below: 

 sp_rename 'Old_table_name', 'New_table_name';

Just run the above query and the magic will happen.

Please make sure you change the table name every like stored procedure,views etc where you have used this table for avoiding breaking things.

Good Luck