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.

How to Rename a Table in SQL Server

As you can see, the table name has changed.

Good luck to everyone in business and life.


Yavuz Selim Kart

I try to explain what I know in software and database. I am still improving myself by doing research on many programming languages. Apart from these, I am also interested in Graphic Design and Wordpress. I also have knowledge about SEO and Social media management. In short, I am a determined person who likes to work hard.

You may also like...

Don`t copy text!