Monday, September 29, 2008

ALTER SCHEMA (Transact-SQL) for SQL Server 2005

If your working with different schemas on SQL Server 2005, you may want to switch the schema of your objects.

ALTER SCHEMA can only be used to move securables between schemas in the same database. To change or drop a securable within a schema, use the ALTER or DROP statement specific to that securable.

Syntax: ALTER SCHEMA schema_name TRANSFER securable_name

ALTER SCHEMA work TRANSFER dbo.ItemNameValuePair
ALTER SCHEMA person TRANSFER work.ItemNameValuePair

MSDN Article

No comments: