Advertisement
VoronVU

ORACLE, XML, XMLCONCAT - SIMPLE EXAMPLE 1

Aug 17th, 2015
566
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. SELECT
  5.   XMLELEMENT("thinker",
  6.   XMLCONCAT(
  7.     XMLELEMENT("ID",t.THINKER_ID),
  8.     XMLELEMENT("ID",t.THINKER_NAME))) AS XML_ROW
  9. FROM thinker t
  10. -----------------------------------------
  11. <thinker><ID>1</ID><ID>Ciceron</ID></thinker>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement