Usage Notes - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

VARIANT_TYPE UDT High-Level Features

UDT Classification Structured Type UDT
UDT Type Name Variant_Type
Associated Methods (UDMs) None
Ordering Functionality Implements full map ordering. The ordering routine will return the value of the first attribute of the VARIANT_TYPE UDT.
The first attribute of the VARIANT_TYPE UDT cannot be one of the following: LOB, UDT, or LOB-UDT.
Transform Functionality None

You cannot import or export the VARIANT_TYPE UDT. You cannot use this data type in SQL statements that result with the data type being returned to the caller as output. Otherwise, you will receive an SQL error stating that no such UDT is defined.

Cast Functionality None

Maximum Number of Supported Parameters

UDFs support a maximum of 128 parameters. In addition, each VARIANT_TYPE input parameter accommodates up to 128 parameters, and you can declare up to 8 UDF input parameters to be of VARIANT_TYPE data type. This increases the number of supported UDF input parameters from 128 to 120 + (8 X 128) = 1144 input parameters per UDF.

Restrictions

  • You can specify the VARIANT_TYPE UDT as a data type of input parameters to UDFs. You cannot use them as the data type for UDF result parameters or for any other purpose.
  • You can use the VARIANT_TYPE data type only with UDFs written in C or C++. You cannot use them with SQL UDFs or UDFs written in Java.
  • All restrictions that apply to structured UDTs also apply to the VARIANT_TYPE UDT.