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

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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