17.10 - Example: XPath Query - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1140-171K
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