16.20 - XMLTABLE - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ XML Data Type

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
Release Date
March 2019
Content Type
Programming Reference
Publication ID
English (United States)


Converts an XML tree structure to a row set.


You can include only one default namespace declaration item. It can appear in any position in the list of comma-separated namespace declarations or at the end of the list.

XML namespace declaration

XML namespaces that are scoped when the query expressions (row and column) are evaluated.

Namespaces declared in the prolog of the queries override any namespace declarations specified here.
The URI (Uniform Resource Identifier) that identifies the XML namespace.
The namespace prefix.
A valid XQuery expression supplied as a character string literal. One row is generated for each item in the result of this query.
XML query argument
An argument or list of arguments for the row pattern query.
Row pattern query arguments are passed in by value. This is the default.

A value expression representing an XML query context item.

You can pass in only one context item.

XML_query_variable AS variable_name

An XML query variable in the format:

value_expression AS identifier

The columns in the table returned by the function.

If not specified, the function returns a single column, named COLUMN_VALUE, which contains XML typed values resulting from the evaluation of the row pattern query.

The name of a column in the output table.
The column contains an integer that represents a sequence number for the rows generated, starting with 1 for the first row.
The data type of a column in the output table.
PATH 'char_str_literal'
The XML table column pattern, a query that returns the column value. This query is evaluated relative to the item returned by the row query; that is, it uses the item returned by the row query as the context item. The resulting value is cast to the column data type.

The default value for the column if the column query returns no results.

The default clause is not applicable for certain data types such as CLOB, BLOB, and UDTs.