Generate XML using SQL query with Oracle database

27 September 2018 | 1 min read

Just a quick blog post. I learn something new by exporing Oracle database documentation1, which is you actually can generate XML from SQL query using XMLELEMENT, XMLAGG and XMLATTRIBUTES or XMLFOREST function. Here an example:

You will get something nice like this:

Thanks to Oracle for providing very extensive and easy features to generate XML.