Rename SQL Table

You can rename a table in SQL Server in following way:

sp_rename OLD_TABLE_NAME, NEW_TABLE_NAME

You must require alteration permission.

Renaming table will not rename stored procedures user-defined functions or programs refer to that table. You must manually modify all object which refer renamed table.

Note: Think twice before you rename a table. If existing stored procedures user-defined functions or programs refer to that table, the name modification will give you an error.

Advertisements