XMLFOREST constructs a forest of XML elements. An element is produced for each XMLFOREST argument.
The following query produces an <item_description> element, with <name>, <color>, and <price> elements:
SELECT ID, XMLELEMENT( NAME item_description, XMLFOREST( Name as name, Color as color, UnitPrice AS price ) ) AS product_info FROM Products WHERE ID > 400; |
The following result is generated by this query:
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |