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));