Oracle Database: Advanced PL/SQL — Question 4
Which three are true about the NOCOPY hint, the PARALLEL ENABLE hint, and the DETERMINISTIC clause? (Choose three.)
Answer options
- A. The PARALLEL_ENABLE clause can be used only in the CREATE FUNCTION statement.
- B. The NOCOPY hint asks the compiler to pass the actual parameters by reference.
- C. A deterministic function's results always depend on the state of session variables.
- D. The NOCOPY hint asks the compiler to pass the actual parameters by value.
- E. A function is deterministic if it always returns the same result for a specific combination of input values.
- F. The PARALLEL_ENABLE clause can be specified for a nested function.
- G. A function defined with the PARALLEL_ENABLE clause may be executed in parallel in a SELECT statement or a subquery in a DML statement.
Correct answer: B, E, G
Explanation
The NOCOPY hint (B) indeed tells the compiler to pass parameters by reference, reducing memory overhead. A deterministic function (E) is defined by its consistent output for the same inputs. Lastly, the PARALLEL_ENABLE clause (G) allows a function to be executed in parallel, enhancing performance. Options A, C, and D are incorrect as they misrepresent the functionalities of the hints and clauses.