Home SQL Server Commands
 

ALTER SCHEMA

Transfer a securable between schemas.

Syntax
      ALTER SCHEMA schema TRANSFER securable
	  
Key:
   securable  A one or two-part name of a schema-contained securable.

In SQL Server 2005, users and schemas are completely separate.

Example

USE Mydatabase;
ALTER SCHEMA MySchema2 TRANSFER MySchema1.MyTable;
GO

"In Europe everything is permanent, and in America everything is provisional. This is the great distinction which, if always kept in mind, will save a great deal of idle astonishment "- Willian Dean Howells

Related commands:

CREATE SCHEMA
DROP SCHEMA
sys.schemas



Back to the Top

Simon Sheppard
SS64.com