--- title: "XSD Annotations (SQLXML)" description: View a list of XSD annotations (SQLXML 4.0) introduced in SQL Server 2005 (9.x), with a comparison to the XDR annotations introduced in SQL Server 2000 (8.x). author: MikeRayMSFT ms.author: mikeray ms.date: "03/17/2017" ms.prod: sql ms.prod_service: "database-engine, sql-database" ms.technology: xml ms.topic: "reference" ms.custom: "seo-lt-2019" helpviewer_keywords: - "annotated XSD schemas, annotations listed" - "XSD schemas [SQLXML], annotations" ms.assetid: c62a6785-8d66-40a2-9c5d-80c73d600a3b monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # XSD Annotations (SQLXML 4.0) [!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb.md)] The following table lists the XSD annotations that were introduced in [!INCLUDE[ssVersion2005](../../includes/ssversion2005-md.md)], and compares them with the XDR annotations that were introduced in [!INCLUDE[ssVersion2000](../../includes/ssversion2000-md.md)]. |XSD annotation|Description|Topic link|XDR annotation| |--------------------|-----------------|----------------|--------------------| |**sql:encode**|When an XML element or attribute is mapped to a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] BLOB column, allows requesting a reference URI. This URI can be used later to return BLOB data.|[Requesting URL References to BLOB Data Using sql:encode (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/requesting-url-references-to-blob-data-using-sql-encode-sqlxml-4-0.md)|**url-encode**| |**sql:guid**|Allows you to specify whether to use a GUID value generated by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] or use the value provided in the updategram for that column.|[Using the sql:identity and sql:guid Annotations](../../relational-databases/sqlxml-annotated-xsd-schemas-using/using-the-sql-identity-and-sql-guid-annotations.md)|Not supported| |**sql:hide**|Hides the element or attribute that is specified in the schema in the resulting XML document.|[Hiding Elements and Attributes by Using sql:hide](../../relational-databases/sqlxml-annotated-xsd-schemas-using/hiding-elements-and-attributes-by-using-sql-hide.md)|Not supported| |**sql:identity**|Can be specified on any node that maps to an IDENTITY-type database column. The value specified for this annotation defines how the corresponding IDENTITY-type column in the database is updated.|[Using the sql:identity and sql:guid Annotations](../../relational-databases/sqlxml-annotated-xsd-schemas-using/using-the-sql-identity-and-sql-guid-annotations.md)|Not supported| |**sql:inverse**|Instructs the updategram logic to inverse its interpretation of the parent-child relationship that has been specified using **\**.|[Specifying the sql:inverse Attribute on sql:relationship (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-the-sql-inverse-attribute-on-sql-relationship-sqlxml-4-0.md)|Not supported| |**sql:is-constant**|Creates an XML element that does not map to any table. The element appears in the query output.|[Creating Constant Elements Using sql:is-constant (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/creating-constant-elements-using-sql-is-constant-sqlxml-4-0.md)|Same| |**sql:key-fields**|Allows specification of column(s) that uniquely identify the rows in a table.|[Identifying Key Columns Using sql:key-fields (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/identifying-key-columns-using-sql-key-fields-sqlxml-4-0.md)|Same| |**sql:limit-field**

**sql:limit-value**|Allows limiting the values that are returned on the basis of a limiting value.|[Filtering Values Using sql:limit-field and sql:limit-value (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/filtering-values-using-sql-limit-field-and-sql-limit-value-sqlxml-4-0.md)|Same| |**sql:mapped**|Allows schema items to be excluded from the result.|[Excluding Schema Elements from the Resulting XML Document Using sql:mapped (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/excluding-schema-elements-from-the-xml-document-using-sql-mapped.md)|**map-field**| |**sql:max-depth**|Allows you to specify depth in recursive relationships that are specified in the schema.|[Specifying Depth in Recursive Relationships by Using sql:max-depth](../../relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-depth-in-recursive-relationships-by-using-sql-max-depth.md)|Not supported| |**sql:overflow-field**|Identifies the database column that contains the overflow data.|[Retrieving Unconsumed Data Using the sql:overflow-field (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/retrieving-unconsumed-data-using-the-sql-overflow-field-sqlxml-4-0.md)|Same| |**sql:prefix**|Creates valid XML ID, IDREF, and IDREFS. Prepends the values of ID, IDREF, and IDREFS with a string.|[Creating Valid ID, IDREF, and IDREFS Type Attributes Using sql:prefix (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/creating-valid-id-idref-and-idrefs-type-attributes-using-sql-prefix-sqlxml-4-0.md)|Same| |**sql:relationship**|Specifies relationships between XML elements. The **parent**, **child**, **parent-key**, and **child-key** attributes are used to establish the relationship.|[Specifying Relationships Using sql:relationship (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-relationships-using-sql-relationship-sqlxml-4-0.md)|The attribute names are different:

**key-relation**

**foreign-relation**

**key**

**foreign-key**| |**sql:use-cdata**|Allows specifying CDATA sections to be used for certain elements in the XML document.|[Creating CDATA Sections Using sql:use-cdata (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/creating-cdata-sections-using-sql-use-cdata-sqlxml-4-0.md)|Same| > [!NOTE] > The XSD native **targetNamespace** attribute replaces the **target-namespace** annotation that was introduced in the [!INCLUDE[ssVersion2000](../../includes/ssversion2000-md.md)] XDR mapping schema. ## See Also [Specifying a Target Namespace Using the targetNamespace Attribute (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-a-target-namespace-using-the-targetnamespace-attribute-sqlxml-4-0.md)