CoderJony

How to change schema name of a table in SQL Server?

Use below script to change schema name of a table in SQL Server.

Generalized Syntax:

ALTER SCHEMA NewSchema TRANSFER CurrentSchema.TableName;
SQL

For example, if you want to change your dbo.Customers table to Config.Customers, then you can use below SQL command.

ALTER SCHEMA Config TRANSFER dbo.Customers;
SQL
Buy Me A Coffee
profile-sample1
profile-image

Ankush JainSoftware Engineer

Recent Posts