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 export data to a csv file?
How to view the data files in the current database?
How to pass parameters to procedures in oracle?
What are the ansi data types supported in oracle?
How to create a server parameter file?
How to build data dictionary view an new database?
In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?
Explain what are the type of synonyms?
How to create an initialization parameter file?
What is a tns file?
How to define a sub function?
Design database draw er diagram for a certain scenario ?
Can we create database in oracle using command line ?
How to create additional tablespaces for an new database?
What is the difference between substr & instr functions?