

Modifying Schema, View, Table, and Routine Definitions › Maintaining Routines and Their Keys › Dropping a Routine
Dropping a Routine
DROP Routine Statements
To drop a routine, use one of the following statements:
- DROP PROCEDURE to drop an SQL procedure
- DROP TABLE PROCEDURE to drop a table procedure
- DROP FUNCTION to drop an SQL scalar function defined by a CREATE FUNCtion statement
No CASCADE
When you drop a routine (without CASCADE), the following definitions are removed from the dictionary:
- The procedure, table procedure or function that is the target of the drop
- All keys defined on the target routine
- All privileges granted on the routine
With CASCADE
If you specify CASCADE, these additional definitions are removed from the dictionary:
- All views in which the routine is referenced and all views referencing those views.
- All privileges granted on views dropped as a result of cascade processing
Example
In the following example, the table procedure WORK_SCHEDULE is dropped. This also drops any views derived from this table procedure.
drop table procedure work_schedule cascade;
Copyright © 2014 CA.
All rights reserved.
 
|
|