16.20 - Default Ordering For a Structured UDT - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

Unlike the case for distinct UDTs, the system does not create a default ordering for a newly created structured UDT; however, you must create an ordering for a new structured type before you can use it as a column type for a table or to perform operations on it that involve comparisons, ordering, grouping, sorting, or determination of its uniqueness. The exceptions to this are the Period and Geospatial data types, which are Teradata internal structured UDTs, and their default casts are predefined.

If you attempt to use a new structured UDT without first defining an ordering for it, the request aborts and the system returns an error to the requestor.

To define an ordering for a new structured UDT, use the CREATE ORDERING statement (see CREATE ORDERING and REPLACE ORDERING).

To determine if a structured UDT already has a defined ordering, use the HELP TYPE statement (see HELP TYPE).