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';
database icon
From SQL Server query to chart to Slack in seconds
Get to answers faster, together, with PopSQL and SQL Server