Checking whether an XML column contains a certain value
You can determine which rows contain any fragment of XML data that you specify.
Procedure
To check whether an XML column contains a certain value:
Specify the XMLEXISTS predicate in the WHERE clause of
your SQL statement.
Include the following parameters for
the XMLEXISTS predicate:
Example
billTo
nodes within
these documents contain any billing addresses. You can use the following
SELECT statement with the XMLEXISTS predicate: SELECT XMLPO FROM T1
WHERE XMLEXISTS ('declare namespace ipo="http://www.example.com/IPO";
/ipo:purchaseOrder[billTo]'
PASSING XMLPO);