Oracle Database: Advanced PL/SQL — Question 10
Which three are true about anonymous blocks and subprograms? (Choose three.)
Answer options
- A. Named subprograms cannot be called from other packages.
- B. PROCEDURE subprograms can accept parameters.
- C. A FUNCTION subprogram must return one or more values.
- D. Anonymous blocks cannot use packaged variables.
- E. Named subprograms are stored in the database server.
- F. Anonymous blocks must always start with the Declare keyword.
- G. FUNCTION subprograms must be called and passed through one or more parameters.
Correct answer: B, C, E
Explanation
Option B is correct because PROCEDURE subprograms are designed to accept parameters. Option C is also correct as FUNCTION subprograms are required to return a value. Option E is true since named subprograms are indeed stored in the database server. The other options are incorrect because they misrepresent the nature of subprograms and anonymous blocks.