|
CREATE XML SCHEMA COLLECTION
Import schema components into a database.
Syntax CREATE XML SCHEMA COLLECTION [relational_schema.]sql_identifier AS Expression Key relational_schema The relational schema name. sql_identifier SQL identifier for the XML schema collection. Expression A string constant or scalar variable. (varchar, varbinary, nvarchar, nvarbinary, or xml type)
The variable in the example below is of nvarchar(max) type. The variable can also be of xml data type, in which case, it is implicitly converted to a string.
Example
DECLARE @MySchemaCollection nvarchar(max)
Set @MySchemaCollection = N' copy the schema collection here'
CREATE XML SCHEMA COLLECTION MyCollection AS @MySchemaCollection
"There are people who put their dreams in a little box and say, "Yes, I've got dreams." Then they put the box away and bring it out once in awhile to look in it, and yep, they're still there. These are great dreams, but they never even get out of the box." ~ Erma Bombeck
Related commands:
sys.xml_schema_collections
sys.xml_schema_namespaces
DROP XML SCHEMA COLLECTION