The DROP TYPE BODY statement is used to drop the body of a user-defined abstract data type (ADT), variable array (VARRAY), or nested table type.
When the body of a type is dropped, the type specification still exists and can be recreated. Although the members of the type cannot be called, the type can still be used until the body is recreated.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Prerequisites
The body of the type must be in the current user's schema, or the user 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 schema name where the type is located. The default value is the current user's schema. |
| drop_type_body | type_name | The name of the type body to be dropped. You can drop a type body only if it has no type or table dependencies. |
Examples
Drop the body of the demo_typ2 type.
DROP TYPE BODY demo_typ2;
