Definition:
In Oracle PL/SQL, SYS_XMLAGG is a built in function which generates an independent node element of an XML document by combining the values of input XML instances under it. ROWSET is the default node element name. It accepts two parameters of XMLtype Instance type and XMLformat instance type respectively.
Example Syntax:
SYS_XMLAGG (expression, format)
In the syntax above, 'format' is the optional parameter.
Example Usage:
SQL> SELECT SYS_XMLAGG(sys_xmlgen(ename)) FROM employee;
SYS_XMLAGG(SYS_XMLGEN(ENAME))
--------------------------------------
<ROWSET>
<ENAME>JOHN</ENAME>
<ENAME>KATE</ENAME>
<ENAME>MILLER</ENAME>
Related Links: