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?

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


Please Help Members By Posting Answers For Below Questions

What is the best way to do multi-row insert in oracle?

1073


Why oracle is used?

1066


What are the types of trigger in oracle?

993


Can we write insert statement in function in oracle?

1101


What is Undo Management Advisor in Oracle?

1109


In oracle there is column command, how will you explain that?

1070


What happens to the current transaction if a ddl statement is executed?

1023


How do I escape a reserved word in oracle?

1210


How to create an oracle database?

1058


what are bitmap indexes? How does they work?

2266


Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.

2123


What is BBED in Oracle?

1167


How can I combine multiple rows into a comma-delimited list in oracle?

1067


What are transaction isolation levels supported by oracle?

1084


How to change system global area (sga) in oracle?

1025