Skip to main content
The DROP TYPE drops a specified from the current database.
The “ statement performs a schema change. For more information about how online schema changes work in CockroachDB, see .

Synopsis

drop_type syntax diagram

Parameters

ParameterDescription
IF EXISTSDrop the type if it exists. If it does not exist, do not return an error.
type_name_listA type name or a comma-separated list of type names to drop.

Required privileges

The user must be the owner of the type.

Details

  • You cannot drop a type or view that is in use by a table.
  • You can only drop a user-defined type from the database that contains the type.

Examples

Drop a single type

Drop multiple types

See also