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 |
Why do we need oracle client?
How does oracle handle read consistency?
What is tns name?
what is difference between where clause and having clause?
What is Hash Index?
wirte the syntax of update query?
What's dateware house and what's clustor with practicle example
Hi, I want table structure shown below. How can i create this ? Num Name Address Addr1 Addr2 I want Addr1 and Addr2 under Address column. How can i achive this ? Is it possible ?
What are the components of Physical database structure of Oracle Database?
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
Why required to run root.sh at the time of installation and what exactly it will do
How will you identify oracle database software release?