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:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of