You can use the DROP TYPE BODY statement to drop the body of an abstract data type (ADT), 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 the type body named demo_typ2.
DROP TYPE BODY demo_typ2;