How to Rename a Table in SQL Server in SQL Server

Renaming a table in SQL Server is performed by using SP_RENAME stored procedure:

--the syntax
exec sp_rename  'old_table_name',  'new_table_name';

--rename users_marketing to users table
exec sp_rename  'users_marketing',  'users';

Finally, a unified workspace for your SQL development

Get more done, together, with PopSQL and SQL Server