Rename Table in SQL Server

Rename Table in SQL Server

Hi friends, in this post we will learn to Rename Table in SQL Server. Renaming a table in SQL server sometimes required as we do require same columns and data, with a different name. We can not use ALTER statement to rename table in SQL server.

Earlier we had discussed about Create Table SQL ServerSchema In SQL ServerSQL Server OperatorsData Type in SQL Server and Drop-Delete SQL Server Database Using Management Studio or Query.

Rename Table SQL Server Query:

----USE DATABASE IN WHICH WE WANT TO CREATE TABLE----
USE Hightechnology
GO

-----EXECUTE SP_RENAME TO RENAME TABLE NAME----
EXEC SP_RENAME 'STUDENT', 'STUDENT_INFORMATION'
GO

Rename table SQL Server with Management Studio:

1. Open SQL Server Management Studio, and connect to SQL Server.

2. Expand Database name > Right click on table, which you want to rename and click on Rename.

rename table in sql server

3. It will ask you new name, enter new name and done.

rename table sql server

how to rename table in sql server