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
How to use regular expression in pattern match conditions in oracle?
What are the database administrators utilities available?
Explain about integrity constraint?
What is the usage of merge statement?
What is an oracle and why it is used?
how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....
Define oracle database
What is the order of defining local variables and sub procedures/functions?
Whats the benefit of dbms_stats over analyze?
How to execute a stored procedure in oracle?
What is execute immediate in oracle?
What are the different windows events activated at runtime ?
How to retrieve the count of updated rows?
How to commit the current transaction in oracle?
Explain a synonym?