# DROP TYPE statement

The DROP TYPE statement removes the specified user-defined type (UDT).

A UDT is created by a CREATE TYPE statement.

## Syntax

    DROP TYPE typeName RESTRICT

The RESTRICT keyword is required. CASCADE semantics are not supported. That is, Derby will not track down and drop orphaned objects.

Dropping a UDT implicitly drops all USAGE privileges that reference it.

You cannot drop a type if it would make another SQL object unusable. This includes the following restrictions:

- Table columns: No table columns have this UDT.
- Views: No view definition involves expressions which have this UDT.
- Triggers: No trigger definition involves expressions which have this UDT.
- Constraints: No constraints reference expressions of this UDT.
- Generated columns: No generated columns reference expressions of this UDT.
- Routines: No functions or procedures have arguments or return values of this UDT.
- Table Functions: No table functions return tables with columns of this UDT.

## Example

    DROP TYPE price RESTRICT;

Parent topic: DROP statements
Related reference
DROP DERBY AGGREGATE statement
DROP FUNCTION statement
DROP INDEX statement
DROP PROCEDURE statement
DROP ROLE statement
DROP SCHEMA statement
DROP SEQUENCE statement
DROP SYNONYM statement
DROP TABLE statement
DROP TRIGGER statement
DROP VIEW statement