17.10 - Default Ordering For a Structured UDT - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
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).