Trapping Exceptions.
0
Trapping Exceptions:
- The exception handling section consists of handlers for all the exceptions.
- An exception handler contains the code that is executed when the error associated with the exception occurs, and the exception raised.
- Each exception handler consists of a WHEN clause which specifies an EXCEPTION that has to be handled.
Syntax:
Exception
When <exception1> [or exception2…] then
SQL statement1
SQL statement2
When <exception3> [or exception4…] then
SQL statement1
SQL statement2
When others then
SQL statement1
SQL statement2
End;
0 comments: