Multiple choice technology databases

Which two conditions must be true for a PL/SQL function to be cached?

  1. It must be part of a package.

  2. It must be a pipelined table function.

  3. It must not be defined in an anonymous block.

  4. It must have at least one OUT or IN OUT parameter.

Reveal answer Fill a bubble to check yourself
C,D Correct answer
Explanation

For a PL/SQL function to be cached, it must not be defined in an anonymous block (which are transient), making option C correct. It must have at least one OUT or IN OUT parameter to support result caching, making option D correct. Option A is incorrect because standalone functions can also be cached. Option B is incorrect because pipelined table functions are not eligible for result caching.