Usage Notes - Advanced SQL Engine - Teradata Database

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
xwv1596137968859.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

You can use UDT expressions as input arguments to UDFs written in C or C++. You cannot use UDT expressions as input arguments to UDFs written in Java.

You can also use UDT expressions as IN and INOUT parameters of stored procedures and external stored procedures written in C or C++. However, you cannot use UDT expressions as IN and INOUT parameters of external stored procedures written in Java.

You can use UDT expressions with most SQL functions and operators, with the exception of ordered analytical functions, provided that a cast definition exists that casts the UDT to a predefined type that is accepted by the function or operator.

Examples

Consider the following statements that create a distinct UDT named euro and a structured UDT named address :

CREATE TYPE euro
AS DECIMAL(8,2)
FINAL;
CREATE TYPE address
AS (street VARCHAR(20)
   ,zip CHAR(5))
NOT FINAL;

The following statement creates a table that defines an address column named location :

CREATE TABLE european_sales
  (region INTEGER
  ,location address
  ,sales DECIMAL(8,2));