How to move an Object to a different Schema in SQL Server

To move objects like (for example tables, views, stored procedures, functions...) between schemas you can use ALTER SCHEMA command.

In this example we will move the Table1 that is currently in dbo schema:

move_table_schema_old

First, we will create a new schema:

CREATE SCHEMA TestSchema
GO

To move the Table1 to the new TestSchema schema:

ALTER SCHEMA TestSchema
TRANSFER dbo.Table1
GO

Table1 was moved to the new TestSchema schema:

move_table_schema_new