DROP TYPE v12

Name

DROP TYPE -- remove a type definition.

Synopsis

DROP TYPE [ BODY ] <name>

Description

DROP TYPE removes the type definition. To execute this command you must be a superuser or the owner of the type.

The optional BODY qualifier applies only to object type definitions, not to collection types nor to composite types. If BODY is specified, only the object type body is removed – the object type specification is not dropped. If BODY is omitted, both the object type specification and body are removed.

The type will not be deleted if there are other database objects dependent upon the named type.

Parameters

name

The name of a type definition to remove.

Examples

Drop the object type named addr_obj_typ:

DROP TYPE addr_obj_typ;

Drop the nested table type named budget_tbl_typ:

DROP TYPE budget_tbl_typ;

See Also

CREATE TYPE, CREATE TYPE BODY