Removing an existing version of a native SQL procedure
You can drop a particular version of a native SQL procedure without dropping the other versions of the procedure.
Before you begin
Procedure
To remove an existing version of a native SQL procedure:
Issue the ALTER PROCEDURE statement with the DROP VERSION clause and the name of the version that you want to drop. If you instead want to drop all versions of the procedure, use the DROP statement.
Examples
- Example of dropping a version that is not active
- The following statement drops the OLD_PRODUCTION version of the P1 procedure.
ALTER PROCEDURE P1 DROP VERSION OLD_PRODUCTION - Example of dropping an active version
- Assume that the OLD_PRODUCTION version of the P1 procedure is the active version. The following example first switches the active version to NEW_PRODUCTION and then drops the OLD_PRODUCTION version.
ALTER PROCEDURE P1 ACTIVATE VERSION NEW_PRODUCTION; ALTER PROCEDURE P1 DROP VERSION OLD_PRODUCTION;