SQL SERVER – Move a Table From One Schema to Another Schema

Just another day, I have received an email from a regular client of Comprehensive Database Performance Health Check. My client wanted to learn the trick to Move a Table From One Schema to Another Schema. Let us learn it today.

SQL SERVER - Move a Table From One Schema to Another Schema MoveTable-800x350

They had recently imported a huge amount of data from another server. Now accidentally they had given the incorrect name of a schema for the table creation. They wanted to move their newly created table from one schema to another schema. This process is very easy to do and let us learn it together.

ALTER SCHEMA NewSchema
TRANSFER OldSchema.TableName;

That’s it. You can now move your table from older schema to newer schema. I hope you find this quick blog post helpful.

Here are my few recent videos and I would like to know what is your feedback about them. You can subscribe to my youtube channel here.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Schema, SQL Scripts, SQL Server
Previous Post
SQL SERVER – List All Dates Between Start and End Date
Next Post
SQL SERVER Management Studio – Grid vs Text Output

Related Posts

Leave a Reply