Oracle XML function ExistsNode. : ExistsNode « XML « Oracle PL / SQL






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.

   
    
  








Related examples in the same category

1.Count(*) and existsnode()
2.existsnode and where clause
3.existsnode(myValue, '/ROWSET')