Count(*) and existsnode()
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> select COUNT(*) from myTable
2 where existsnode(doc, '/message/greeting') = 1
3 /
COUNT(*)
----------
0
1 row selected.
SQL> drop table myTable;
Table dropped.
Related examples in the same category