Multiple choice technology programming languages

What statements must be used in order to raise a user-defined exception in PL/SQL?

  1. RAISE

  2. PRAGMA EXCEPTION_INIT

  3. OTHERS

  4. EXCEPTION

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

In PL/SQL, user-defined exceptions are raised using the RAISE statement. The EXCEPTION keyword is used in the exception declaration section (EXCEPTION_INIT pragma links error codes to exceptions) and in the exception handling block (BEGIN...EXCEPTION...END). To actually raise a user-defined exception, you must declare it, then use RAISE exception_name.