You can use the DROP TYPE statement to drop the specification and body of an abstract data type (ADT), VARRAY, or nested table type.
Prerequisites
This ADT, VARRAY, or nested table type must be located in your own schema, or you must have the ALTER ANY TYPE system privilege.
Syntax
Syntax of drop_type:
DROP TYPE [ schema. ] type_name [ FORCE | VALIDATE ] ;
Semantics
| Syntax |
Keyword or syntax node |
Description |
| drop_type |
schema |
The name of the schema where the type is located. The default value is your schema. |
| drop_type |
type_name |
The name of the ADT, VARRAY, or nested table type to be dropped. You can drop only a type on which no type or table depends.
- If
type_name specifies a supertype, the execution of this statement will fail.
- If
type_name specifies a statistical information type, the execution of this statement will fail.
- If
type_name specifies an ADT associated with a statistical information type, the database first attempts to disassociate type_name from the statistical information type, and then drops the ADT specified by type_name. However, if statistical information is collected by using the statistical information type, the database cannot disassociate type_name from the statistical information type, and the execution of this statement will fail.
- If
type_name specifies an index type, the database tags this index type as INVALID.
- If a public synonym has been defined on
type_name, the database will also drop this synonym.
|
Examples
Drop the type named demo_typ2.
DROP TYPE demo_typ2 FORCE;