SQL Server: Script to rename Database Name, Table Name, Column Name

In this post, I am providing different scripts to rename Database, Table, and Column of SQL Server.

In day to day life, renaming Database or other objects is common requirements for all database professional.

But as much as, we should avoid this practice because stored procedures or functions are using table or column on which you are going to execute rename operation.

During rename operation, You will also get below warning message.

You can use SP_RENAME to rename different objects.

Script to Rename Databases:

Script to Rename Tables:

Script to Rename Columns:


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

Be the First to Comment!

Notify of
avatar

wpDiscuz