SQL Server: T-SQL Script to change Schema of all the Tables

In this post, I am sharing one T-SQL script to change the schema name of all the tables in a SQL Server Database.

When you require to alter your database schema name and you have a large number of tables, you can use this kind of script to alter the schema name.

First, you need to create one new schema and you can replace [New_Schema_Name] by your newly created schema name. You can also add a table filter in the cursor main query.

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of