how to retrive xml data for using sql query?
Answers were Sorted based on User's Feedback
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 |
Answer / ksonga
SET VERIFY OFF
SET ECHO OFF
SET PAGES 0
SET LONG 100000
SET lONGCHUNKSIZE 10000
SET LINESIZE 200
select dbms_xmlgen.getxml('select * from emp') from dual
| Is This Answer Correct ? | 7 Yes | 0 No |
IS it possible to built the oracle database without setting the kernal parameters?
Describe the types of sub query?
why you need store procedure ? where do we use it in a Java project? can you get the code for as store procedure using in Java?
How to define a procedure inside another procedure?
What does a Control file Contain ?
How to insert a new row into a table in oracle?
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
What are the uses of Rollback Segment ?
What happens if you use a wrong connect identifier?
How to import one table back from a dump file?
how to get the second max val for every group in a table
What is oracle datasource?