FOR XML and Legacy XML Support

Abstract

SQL Server 2008 supports XML generation from relational data via the FOR XML clause of the SELECT statement. The FOR XML clause is a flexible and versatile way to quickly and easily construct XML from your relational data. SQL Server 2008 continues the tradition of FOR XML clause support, including the following enhancements to the FOR XML clause:
  • The addition of PATH mode simplifies, and adds flexibility to, the process of specifying an explicit structure for your XML data.

  • The XSINIL and ABSENT modifiers for the ELEMENTS option provide fine-grained control over SQL NULL representation in your XML result.

  • The TYPE option for converting your result XML to the xml data type.

  • Support is included for nested FOR XML queries.

Keywords

Assure Prefix 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Michael Coles 2008

Personalised recommendations