how to retrive xml data for using sql query?
Answer Posted / d ashwin
SELECT XMLELEMENT
("Emp", XMLELEMENT("name", e.fname ||' '|| e.lname),
XMLELEMENT ( "hiredate", e.hire))
AS "RESULT"
FROM employees e
WHERE employee_id > 200 ;
This query produces the following typical XML result:
RESULT
-----------------
<Emp>
<name>John Smith</name>
<hiredate>2000-05-24</hiredate>
</Emp>
<Emp>
<name>Mary Martin</name>
<hiredate>1996-02-01</hiredate>
</Emp>
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
Please explain oracle left join with an example?
What are the ansi data types supported in oracle?
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
What is pragma autonomous transaction in oracle?
What is index-organized table in Oracle?
What is a package in oracle?
What is MTTR advisor in Oracle?
Hi this srilatha. I comlpeted my Oracle-hrms. can u provide me interview questions on Core hr, payroll,sshr,OLM etc..
How to rename an index?
How can you use check constraints for self referential integrity?
What is the quickest way to fetch the data from a table?
What are the differences between date and timestamp in oracle?
Difference between inner join vs where ?
What are the attributes of the cursor?
How to generate query output in html format?