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:
ID |
product_info |
||
---|---|---|---|
401 |
|
||
500 |
|
||
501 |
|
||
... | ... |
For more information, see XMLFOREST function [String].
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |