How to Rename a Table 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';
Cta

Better SQL for the people

Get more done with PopSQL and SQL Server