Oracle Database: Advanced PL/SQL — Question 11
Which two statements are true about using the OR REPLACE clause when creating named subprograms? (Choose two.)
Answer options
- A. Function based indexes remain usable when replacing the function on which the index depends.
- B. Object privileges to execute a replaced function must be regranted to those users who had the privilege.
- C. This clause can be used only for procedures and functions.
- D. A function definition can be modified without dropping and re-creating it.
- E. Object privileges to execute a replaced function are retained by those users who had the privileges.
Correct answer: D, E
Explanation
The correct answer, D, is valid because the OR REPLACE clause allows modifications to a function without the need to drop it first. E is also correct since object privileges for executing a function are retained even after the function is replaced. Options A, B, and C are incorrect as they do not accurately reflect the behavior of the OR REPLACE clause regarding indexes, regranting privileges, or its applicability.