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
What is the best way to do multi-row insert in oracle?
Why oracle is used?
What are the types of trigger in oracle?
Can we write insert statement in function in oracle?
What is Undo Management Advisor in Oracle?
In oracle there is column command, how will you explain that?
What happens to the current transaction if a ddl statement is executed?
How do I escape a reserved word in oracle?
How to create an oracle database?
what are bitmap indexes? How does they work?
Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.
What is BBED in Oracle?
How can I combine multiple rows into a comma-delimited list in oracle?
What are transaction isolation levels supported by oracle?
How to change system global area (sga) in oracle?