ODBC applications always transfer values of a UDT as values of the external type associated with the UDT and the external type is always a predefined database type. For example, when the select-list of a SELECT statement contains a UDT expression, the database server automatically converts the UDT data to its external type before returning the data to the ODBC application. When inserting into a UDT column, the database server automatically converts the external type data to UDT internal format. Therefore, the use of UDTs in requests and result sets is transparent to the ODBC application.
Creating a UDT using ODBC Driver for Teradata is done in a similar manner to creating other database objects. The ODBC client calls the ODBC SQLExecDirect() functions (or SQLPrepare() plus SQLExecute() to issue the appropriate “CREATE TYPE...” SQL statement followed by “CREATE METHOD...”, “CREATE TRANSFORM...”, and “CREATE ORDERING...” statements as needed to fully create the type.
UDTs are visible in the ODBC catalog functions and in Results.