Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Oracle SQL :Converting Table Data to XML format



Converting data from the Table to XML format





select dbms_xmlgen.getxml('select employee_id, first_name, 
last_name, phone_number from employees where rownum
from dual


SELECT xmlelement("Name",first_name), xmlelement("ID",id),
2 xmlelement("City", city)
3 FROM employee
Output
XMLELEMENT("NAME",FIRST_NAME)        XMLELEMENT("ID",ID)     XMLELEMENT("CITY",CITY)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SEKHAR/Name> 01chennai
chandra02Delhi
Suman03Hyderabad
Madhu04Kolkota
Sreedhar05Mumbai
Anuradha06Noida


This post first appeared on EBiz Integration Technics, please read the originial post: here

Share the post

Oracle SQL :Converting Table Data to XML format

×

Subscribe to Ebiz Integration Technics

Get updates delivered right to your inbox!

Thank you for your subscription

×