15.00 - DROP TYPE - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

DROP TYPE

Prerequisites to Dropping UDT Definitions

The following things about a UDT must all be true before you can drop its definition. These prerequisites apply equally to ARRAY and VARRAY types, whether one‑dimensional or multidimensional.

  • A definition for the UDT you want to drop must exist.
  • No database object in the system either directly or indirectly references the specified UDT.
  • There can be no table in any database with a column data type defined with the specified UDT.
  • There can be no structured UDT where one of its attributes is the specified UDT.
  • There can be no user-defined cast that references the specified UDT.
  • There can be no method in any database that references the specified UDT.
  • There can be no UDF of any kind in any database or user that references the specified UDT.
  • There can be no ordering defined for the UDT.
  • There can be no transform defined for the UDT.
  • Otherwise, the request aborts and the system returns an error to the requestor.

    This means that you must clean up all of the following before you drop the UDT from your production environment:

  • Tables that use the UDT.
  • Structured UDTs that use the UDT for one or more attributes.
  • UDFs of any kind that use the UDT as a parameter type.
  • Methods that use the UDT as a parameter type.
  • Casts associated with the UDT.
  • Orderings associated with the specified UDT.
  • Transforms associated with the specified UDT.
  • When you drop a UDT definition, the following things occur automatically:

  • The system also drops all methods associated with the specified UDT.
  • The system drops all external routines and libraries associated with the dropped methods.