Multiple choice

Which of the following is/are incorrect about 'raise_application_error' in PL/SQL?

  1. It defines the user-defined error message.

  2. The syntax for this procedure is raise_application_error(error_number, message).

  3. By using this procedure, all the uncommitted transactions within the PL/SQL block are rolled back automatically.

  4. RAISE_APPLICATION_ERROR raises an exception but does not handle it.

  5. Both (2) and (4)

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The correct syntax is: raise_application_error(error_number, message[, {TRUE | FALSE}]); where error_number is a negative integer in the range -20000 -20999  and message is a character string up to 2048 bytes long.