Drop named row types from a type hierarchy

To drop a named row type from a type hierarchy, use the DROP ROW TYPE statement. However, you can drop a type only if it has no dependencies. You cannot drop a named row type if either of the following conditions is true:
  • The type is currently assigned to a table.
  • The type is a supertype of another type.
The following example shows how to drop the sales_rep_t type:
DROP ROW TYPE sales_rep_t RESTRICT;
To drop a supertype, you must first drop each subtype that inherits properties from the supertype. You drop types in a type hierarchy in the reverse order in which you create the types. For example, to drop the person_t type that Inheritance and type substitutability shows, you must first drop its subtypes in the following order:
DROP ROW TYPE sale_rep_t RESTRICT;
DROP ROW TYPE employee_t RESTRICT;
DROP ROW TYPE person_t RESTRICT;
Important: To drop a type, you must be the database administrator or the owner of the type.