Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to retrive xml data for using sql query?

Answers were Sorted based on User's Feedback



how to retrive xml data for using sql query?..

Answer / 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

how to retrive xml data for using sql query?..

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 retrive xml data for using sql query?..

Answer / dfd

select * from emp hahahaha

Is This Answer Correct ?    2 Yes 11 No

Post New Answer

More Oracle General Interview Questions

How to define an anonymous block?

0 Answers  


Write a simple Store procedure and pass parameter to it ?

3 Answers   Keane India Ltd,


what is the difference between authorization and authentication?

4 Answers   MAHINDRA, PUCIT,


Calculate difference between 2 date / times in oracle sql?

0 Answers  


How to delete all rows a table in oracle?

0 Answers  


Why do we use bulk collect in oracle?

0 Answers  


What is the CAP theorem?

1 Answers  


From the database level, how can you tell under which time zone a database is operating?

1 Answers  


Is it possible to enter only time value into a column of a table in sql?

2 Answers  


Explain the use of grant option in exp command.

0 Answers  


How can we Update a table with out using UPDATE command?

1 Answers  


How to count groups returned with the group by clause in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)