創建一個xml表
create table contact of xmltype;
插入一段xml數據
insert into contact values(XMLType('
<contact id="1">
<category>customer</category>
<first_name>John</first_name>
<last_name>Smith</last_name>
<email>[email protected]</email>
</contact>'));
查詢first_name
select XMLQuery('/contact/first_name' PASSING c.object_value RETURNING CONTENT) result from contact c;