17.10 - XMLQUERY Syntax - 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)
XMLQUERY (
  'xquery_expression'
  [ xml_query_argument ]
  [ RETURNING { CONTENT | SEQUENCE } ]
  [ { NULL | EMPTY } ON EMPTY ]
)

Syntax Elements

xml_query_argument
PASSING [ BY VALUE ]
  { XML_query_context_item | XML_query_variable_spec [,...] }
XML_query_variable_spec
XML_query_variable AS variable_name
'xquery_expression'
The XQuery query string supplied as a character string literal.
RETURNING CONTENT
The return value is a document node with one or more child element nodes.
RETURNING SEQUENCE
The return value is a sequence. This is the default.
NULL ON EMPTY
A NULL is returned if the query result is an empty sequence.
EMPTY ON EMPTY
An empty sequence is returned if the query result is an empty sequence.
BY VALUE
XML query arguments are passed in by value. This is the default.
XML_query_context_item

A value expression representing an XML query context item.

You can pass in only one context item.