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 a subquery in oracle?
How many data types are supported?
In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col
Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.
What is the use of oracle?
How to delete multiple rows from a table in oracle?
Where do you use decode and case statements?
Is oracle the best database?
Does facebook use oracle?
Which is better Oracle or MS SQL? Why?
what is the difference between functional dependecy and multilevel dependency?
How to define default values for formal parameters?
How to insert a new row into a table in oracle?
What are group functions in oracle?
interview questions with answer for cts