Count(*) and existsnode() : ExistsNode « XML « Oracle PL / SQL






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

1.Oracle XML function ExistsNode.
2.existsnode and where clause
3.existsnode(myValue, '/ROWSET')