Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
The XMLDATA directive in FOR XML returns an inline XDR schema together with the query result. However, the XDR schema doesn't support all the new data types and other enhancements introduced in SQL Server 2005 (9.x) and later versions. Instead, you can request an inline XSD schema by using the XMLSCHEMA directive.
Important
The XMLDATA directive to the FOR XML option is deprecated. Use XSD generation in the case of RAW and AUTO modes. There is no replacement for the XMLDATA directive in EXPLICIT mode. This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
Also note the following about the inline XDR schema support:
If the FOR XML query result includes columns of xml type and you request an inline XDR schema, an error is returned. Inline XDR doesn't support these types.
The (n)varchar(max) and (n)varbinary(max) types will be mapped to (n)varchar(n) and varbinary(n), respectively.
When compatibility mode is set to 90 or higher, timestamp values are considered as varbinary(8) data, are treated like binary data, and are returned in the result as follows:
Base 64 encoding is used when binary base64 is specified.
URL encoding is used in AUTO mode when binary base64 isn't specified.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Design a Performant Data Model in Azure SQL Database with Azure Data Studio - Training
Learn how to create a data model, tables, indexes, constraints, and use data types with Azure data studio.