Dropping objects in a module
Dropping modules is a task that can be done when you no longer require the objects defined within the module. If only some of the objects in the module are no longer required you can optionally just drop those objects.
Before you begin
- The module must exist.
- You must have the authority to execute the ALTER MODULE statement.
About this task
Restrictions
Procedure
Results
Example
CREATE MODULE m @
ALTER MODULE m PUBLISH PROCEDURE B() @
ALTER MODULE m PUBLISH PROCEDURE A()
BEGIN
CALL B();
END @
ALTER MODULE m ADD PROCEDURE B() BEGIN END @ The procedure
B can be dropped by executing the following statement:ALTER MODULE m DROP PROCEDURE B @When the statement executes successfully, the procedure B is dropped
from module m. The dependent object procedure A is marked
as inoperative, because procedure B which it references is no longer
available. All of the private objects defined in a module named m can be dropped by executing:
ALTER MODULE m DROP BODY @When the statement executes successfully:
- The bodies of published procedures defined in the module will be dropped. The procedure prototypes remain defined.
- The data types and global variables that are private to the module are dropped. The published data types and global variables remain defined.
- The module is not dropped. It remains defined within the schema.