How to Generate XML in Oracle Using SQL

SELECT XMLELEMENT ("ROW",
                   XMLFOREST (empno,
                              ename,
                              hiredate,
                              sal,
                              deptno,
                              mgr,
                              comm))
  FROM emp;
 

You might like