Mega Code Archive

 
Categories / Oracle PLSQL / XML
 

Use UPDATEXML function to update a portion of the doc

SQL> SQL> SQL> CREATE TABLE myTable   2  (id  NUMBER PRIMARY KEY   3  ,doc XMLType NOT NULL)   4  XMLTYPE doc STORE AS CLOB   5  / Table created. SQL> SQL> SQL> update myTable   2  set doc = updateXml(doc, 'message/greeting/text()', 'test')   3  where id = 1; 0 rows updated. SQL> SQL> SQL> drop table myTable; Table dropped.