| Lesson 6 | Raise explicit exceptions |
| Objective | Raise an exception based on user-defined criteria. |
RAISE statement.
DECLARE section of a PL/SQL blockRAISE statement
RAISE statement for a given expression can be coded anywhere within the scope of that expression.
The RAISE statement stops normal execution of the PL/SQL block and transfers control to the appropriate exception handler. The
exception can be a predefined exception or a user-defined exception.
RAISE statement can also be used
without an exception name. This is allowed only within an exception handler, and its effect is to reraise the current exception.