6.6 Dropping an Object Type

Table of Contents Previous Next


6 Object Types and Objects : 6.6 Dropping an Object Type

DROP TYPE objtype;
objtype is the identifier of the object type to be dropped. If the definition of objtype contains attributes that are themselves object types or collection types, these nested object types or collection types must be dropped last.
If an object type body is defined for the object type, the DROP TYPE command deletes the object type body as well as the object type specification. In order to recreate the complete object type, both the CREATE TYPE and CREATE TYPE BODY commands must be reissued.
The following example drops the emp_obj_typ and the addr_obj_typ object types created earlier in this chapter. emp_obj_typ must be dropped first since it contains addr_obj_typ within its definition as an attribute.

6 Object Types and Objects : 6.6 Dropping an Object Type

Table of Contents Previous Next