Alter Schema – Move object to another schema

As easy as this syntax is, I had to keep looking it up for about a year. I suppose that’s why you are here. Well, here it is:

[cc lang=”sql”]
ALTER SCHEMA newschema TRANSFER oldschema.Table

This will transfer the table defined under “oldschema” and transfer it to “newschema”.

One comment
Jon 01 Mar 2013 at 2:50 pm

I’m trying to do that with a table that has about 200 mill rows and it is taking too much time. Is it normal? Thank you very much

Featured Articles

 Site Author

  • Thanks for visiting!