ALTER SCHEMA newSchemaName TRANSFER [OldSchemaName].MyTable
This can therefore be used to assign tables created under a particular user to dbo (which can be necessary as sometimes stored procedures may fail with "Invalid object name" if tables are not under dbo) as follows:
ALTER SCHEMA dbo TRANSFER [OldSchemaName].MyTable
No comments:
Post a Comment