SQL Flow Field Guide

CREATE XML SCHEMA COLLECTION

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

defines xml schema collection (no row flow)

What changes

Input
catalog
Output or change
catalog: xml schema collection

Syntax at a glance

CREATE XML SCHEMA COLLECTION [ <relational_schema>. ] sql_identifier AS Expression

Work example

An XML column or parameter needs validation against a shared schema.

Review schema provenance, namespace, version changes, and valid and invalid synthetic documents.

Check your work A valid document is accepted and a document with the wrong shape is rejected.

Open Microsoft Learn for full syntax, permissions, and details for your version.