QuestionQ58

PL/SQL Language Fundamentals

Review the following code:

Question Image

What will be the result?

  • A It will execute successfully and will display the user-defined error message.
  • B It will result in an error as the range of the error code can only be from “-20000 to -20999.”
  • C It will result in an error as the range of the error code can only be from “-1000 to -2000.”
  • D It will result in an error as the range of the error code can only be from “-2000 to -2999."
Explanation

RAISE_APPLICATION_ERROR accepts application error numbers only from -20000 through -20999, inclusive. The value -3167 is outside that range, so Oracle raises an error for an invalid error-number argument instead of issuing the specified user-defined message.

Learn more

Community Discussion

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