15.00 - Default Ordering For a Structured UDT - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

Default Ordering For a Structured UDT

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/ REPLACE ORDERING” on page 416).

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