Example: XPath Query

Teradata Vantageā„¢ XML Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1140-162K

You can use methods like EXISTSNODE on the XML type to check for existence of nodes matching an XPath expression:

SELECT customerID
FROM customer
WHERE customerxml.EXISTSNODE('/Customer/Name', '') = 1;

The query result is:

 customerID
-----------
          1