Oracle PL/SQL - PL SQL Statement Exception


PL/SQL has a set of commands to support exceptions.

Declare the exception.

By declaring the exception, you're creating a new type of exception.

Many Oracle predefined exceptions exist, for example, ZERO_DIVIDE.

You don't need to explicitly declare them.

Raise an exception.

You can raise declared exception within the program.

For user-defined exceptions, you raise the exception for condition in your code.

For predefined exceptions, the exceptions are automatically raised when the problem occurs.

Handle the exception.

You can add handler logic to deal with exceptions occurred.

Related Topics