XML SCHEMA COLLECTION#

An XML schema collection stores XML Schema (XSD) definitions used to type and validate xml values. See XML for how typed XML is used.

CREATE XML SCHEMA COLLECTION#

Creates a new schema collection from an XSD definition.

CREATE XML SCHEMA COLLECTION collection name AS schema expression

ALTER XML SCHEMA COLLECTION#

Adds schema components to an existing collection.

ALTER XML SCHEMA COLLECTION collection name ADD schema expression

DROP XML SCHEMA COLLECTION#

Removes a schema collection.

DROP XML SCHEMA COLLECTION collection name

Examples#

CREATE XML SCHEMA COLLECTION dbo.BookSchema AS '<xsd:schema> ... </xsd:schema>';

See also