How to Rename Table in SQL Server with an example?. To demonstrate this, we use the below-shown Customer.
SQL Rename Table Name Example
There is a stored procedure called SP_RENAME to rename the table name. In this example, we will change the Customer using this sp. The syntax to use this sp_rename on the existing ones is as shown below.
SP_RENAME '[Old Table Name]', '[New Table Name]'
We use the above sp_rename syntax to change the Customers to NewCustomers
Using Management Studio
SSMS Approach 2
To rename Table in SQL Server, within the Object Explorer, Go to the Database where it exists. Next, please Right click on it, and select the Rename from the context menu.
We are changing the name to Customers and from the below image you can see the new.