Advertisement
VoronVU

ORACLE, XML, XMLFOREST - SIMPLE EXAMPLE 1

Aug 13th, 2015
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WITH thinker AS(
  2. SELECT 1 AS THINKER_ID, 'Ciceron' AS THINKER_NAME, 'Roma' AS THINKER_PLACE FROM DUAL
  3.    
  4. )
  5. SELECT
  6.   XMLELEMENT("THINKER",
  7.     XMLFOREST(t.THINKER_ID AS "ID", t.THINKER_NAME AS "NAME", t.THINKER_PLACE AS "PLACE")
  8.   ) AS XML_ROW
  9. FROM thinker t
  10. ----------------------------------
  11. <THINKER>
  12.     <ID>1</ID>
  13.     <NAME>Ciceron</NAME>
  14.     <PLACE>Roma</PLACE>
  15. </THINKER>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement