1Z0-149 practice question 5 of 15
Which two statements are true about using the OR REPLACE clause when creating named subprograms? (Choose two.)
Full set: 65 questionsUsing CREATE [OR REPLACE] allows you to redefine an existing standalone procedure or function without first dropping it. Because the object is replaced—not dropped—grants previously given on that object remain intact. Therefore, you can alter the source text while preserving privileges and without issuing DROP/CREATE.
A. Replacing a referenced function invalidates (and makes unusable) any function-based index until it is rebuilt.
B. OR REPLACE keeps, not removes, existing EXECUTE privileges.
C. OR REPLACE is also valid for views, packages, package bodies, triggers, etc., not only procedures/functions.
1. Oracle Database SQL Language Reference 19c, “CREATE FUNCTION”, clause OR REPLACE, p. 27-40 (“Replaces the definition… grants remain.”)
2. Same manual, “CREATE PROCEDURE”, p. 27-79.
3. Oracle Database Administrator’s Guide 19c, chap. 19 “Managing Indexes”, sec. “Function-Based Indexes become invalid when the function is modified”.
Keep practicing
Take the free 1Z0-149 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-149 practice questions
- Question 3Which two PL/SQL elements can be deprecated using the DEPRECATE pragma? (Choose two.)
- Question 6Which three are true about functions and procedures? (Choose three.)
- Question 8Which two are true about the PLSQL_CODE_TYPE parameter? (Choose two.)
- Question 9Which three SQL statements, embedded in PL/SQL, typically benefit from using variables de…
- Question 11SERVEROUTPUT is enabled. Which code block will display the values from 1 to 10 in descend…
- Question 15SERVEROUTPUT is enabled. Which is the correct method to use a PACKAGED CONSTANT in SELECT…
