ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
XMLQuery returns query results as XML. XMLTable returns results as relational data.
SELECT <column_list>, XMLQuery (
'for $i IN <record_end_tag>
where $i<item_end_tag> = <value>
order by $i<item_end_tag>
return $i<item_end_tag>
PASSING BY VALUE <xml_record_column>
RETURNING CONTENTS) <returning_column_alias>
FROM <table_name>;
Note: What is within the parentheses is case sensitive and you can not use Upper Case or InitCap for commands.
col column_value format a50
SELECT t.column_value
FROM person_data a,
XMLTABLE (
'for $root in $date
where $root/PDRecord/PDName = "Daniel Morgan"
return $root/PDRecord/PDDOB/text()'
passing a.person_data AS "date") t;