The genxmlquery() and genxmlqueryclob() XML functions
These functions take a SQL query as a parameter and return the result set in XML.
Purpose
Use these functions to retrieve results with each column in an element.
The genxmlquery() syntax
The genxmlclobelemclob() syntax
Parameters
- row
- The rows and columns to return.
- query
- The SQL query whose result set will be returned as XML.
Example 1
EXECUTE FUNCTION genxmlquery('manufact_set','SELECT * FROM manufact');
<manufact_set>
<row>
<manu_code>SMT</manu_code>
<manu_name>Smith</manu_name>
<lead_time>3</lead_time>
</row>
</manufact_set>