QuestionQ45

PL/SQL Language Fundamentals

Examine this code:

ALTER SESSION SET plsql_warnings='ENABLE:ALL';  
/  

You compile this function:

Question Image

What occurs when the function is created with PLSQL_WARNINGS set to 'ENABLE: ALL'?

  • A It fails compilation.
  • B There are no compilation warnings or errors.
  • C A severe compilation warning is generated.
  • D A performance compilation warning is generated.
  • E An information compilation warning is generated.
Explanation

All possible paths through the conditional return a value, making RETURN 100; unreachable. With all PL/SQL warnings enabled, Oracle emits PLW-06002, an informational warning for unreachable code.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!