How create Oracle XML function ExistsNode.

December 30, 2009 | Filed Under XML | Leave a Comment

Oracle XML function ExistsNode
SQL>
SQL> CREATE TABLE myTable(
2 id NUMBER PRIMARY KEY
3 ,doc XMLType NOT NULL
4 )
5 XMLTYPE doc STORE AS CLOB
6 /

Table created.

SQL>
SQL> — Demo the selfish style of invocation
SQL> select COUNT(*)
2 from myTable x
3 where x.doc.existsnode(’/message/greeting’) = 1
4 /

COUNT(*)
———-
0

1 row selected.

SQL>
SQL> drop table myTable;

Table dropped.

Post to Twitter

  • Share/Bookmark
Article written by urooj

Comments

Leave a Reply





© PHPInterviewQuestion.com 2009

eXTReMe Tracker