How to Rename a Table in SQL Server?
Hello to everyone,
In this article, I will provide information on how to rename a table name in SQL Server.
In SQL Server you may want to rename the table name in some cases.
You can easily do this using the code below.
exec sp_rename 'dbo.Categories', 'NewCategoryName'
I made my transactions using the Northwind database. You can try it on the database you want.
When you run the code, you will get a result similar to the one below.
As you can see, the table name has changed.
Good luck to everyone in business and life.