O'Reilly logo

Pro SQL Server 2008 XML by Michael Coles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. FOR XML and Legacy XML Support

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required