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 |
How to change program global area (pga) in oracle?
What are the different types of trigger and explain its various uses and functions?
How to get execution path reports on query statements?
Explain a segment?
How to loop through a cursor variable?
How to return top 5 rows in oracle?
what is port in oracle? how is it related to database application.
What is ASM (Automatic Storage Management) in Oracle?
How to load excel data sheet to oracle database
What are the differences between a sys and system user and what are the extra privileges available to the sys user?
How to define a data field as not null?
What is save point in oracle database?