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.


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz