DROP TYPE BODY

2025-11-19 10:08:13  Updated

You can use the DROP TYPE BODY statement to drop the body of a user-defined abstract data type (ADT), variable array (VARRAY) type, or nested table type.

After the body of a type is dropped, the specification of the type still exists, and the body of the type can be re-created. Before the body of the type is re-created, this type can still be used, but its member functions cannot be called.

Applicability

This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.

Prerequisites

The type body must be located in your own schema, or you must have the ALTER ANY TYPE system privilege.

Syntax

The syntax of DROP TYPE BODY is as follows:

DROP TYPE BODY [ schema. ] type_name ;

Semantics

Syntax Keyword or syntax node Description
drop_type_body schema The name of the schema where the type is located. The default value is your schema.
drop_type_body type_name The type body to be dropped. Only a type body without type or table dependencies can be dropped.

Examples

Drop a type body named demo_typ2.

DROP TYPE BODY demo_typ2;

Contact Us