16.20 - Example: XPath Query - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ XML Data Type

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1140-162K
Language
English (United States)

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