Defining Functions that Use UDT Types | Teradata Vantage - Defining Functions that Use UDT Types - Teradata Vantage - Analytics Database

SQL External Routine Programming

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
2026-03-06
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

UDTs are custom data types that allow you to model the structure and behavior of data that your application uses.

Teradata supports two types of UDTs:

UDT Type Description
Distinct Based on single predefined data type such as INTEGER or VARCHAR.
Structured Consists of one or more named attributes that can be predefined types or other UDTs.
UDTs can be the data types of the following:
  • Columns in table definitions
  • Parameters and return values of scalar, aggregate, and table UDFs

Teradata also supports a form of structured UDT called a dynamic UDT. Instead of using a CREATE TYPE statement to define the UDT, use the NEW VARIANT_TYPE expression to declare an instance of a dynamic UDT and define the attributes of the UDT at run time.

Dynamic UDTs can only be the data types of input parameters to UDFs.