|Oracle® Database SQL Reference
10g Release 2 (10.2)
|PDF · Mobi · ePub|
Note:Do not use this statement to remove a single object from a package. Instead, re-create the package without the object using the
BODYstatements with the
See Also:CREATE PACKAGE
The package must be in your own schema or you must have the
PROCEDURE system privilege.
BODY to drop only the body of the package. If you omit this clause, then Oracle Database drops both the body and specification of the package.
When you drop only the body of a package but not its specification, the database does not invalidate dependent objects. However, you cannot call one of the procedures or stored functions declared in the package specification until you re-create the package body.
Specify the schema containing the package. If you omit
schema, then the database assumes the package is in your own schema.
Specify the name of the package to be dropped.
Oracle Database invalidates any local objects that depend on the package specification. If you subsequently reference one of these objects, then the database tries to recompile the object and returns an error if you have not re-created the dropped package.
If any statistics types are associated with the package, then the database disassociates the statistics types with the
FORCE clause and drops any user-defined statistics collected with the statistics types.
Dropping a Package: Example The following statement drops the specification and body of the
emp_mgmt package, which was created in "Creating a Package Body: Example", invalidating all objects that depend on the specification:
DROP PACKAGE emp_mgmt;