Multiple choice technology databases

Which statement is valid when removing procedures?

  1. Use a drop procedure statement to drop a standalone procedure

  2. Use a drop procedure statement to drop a procedure that is part of a package.Then recompile the package specification

  3. Use a drop procedure statement to drop a procedure that is part of a package.Then recompile the package body

  4. For faster removal and re-creation, do not use a drop procedure statement. Instead, recompile the procedure using the alter procedure statement with the REUSE SETTINGS clause.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The DROP PROCEDURE statement is used to remove standalone procedures in Oracle. For procedures that are part of a package, you cannot drop them individually - you must drop or recompile the entire package. The ALTER PROCEDURE statement with REUSE SETTINGS is used for recompiling, not for dropping procedures.

AI explanation

A standalone stored procedure (not part of a package) is removed with a plain DROP PROCEDURE statement. Procedures inside a package can't be dropped individually — you'd have to edit and recompile the whole package body, since the package's procedures are defined together as a single compiled unit.