March 2012
Intermediate to advanced
442 pages
9h 31m
English
In object-oriented languages, we have the concept of exception blocks and catch blocks. The code in the exception block can raise an exception and the catch block handles this exception. We can implement a similar logic in DB2 by using exception blocks.
As part of PL/SQL support, DB2 9.7 extends the support for exception handling by providing the concept of exception blocks. We can define a set of possible exceptions and their respective handlers for a given set of SQL statements. In this recipe, we will discuss how we can design and implement exception handling by using PL/SQL exception blocks.
To implement PL/SQL exception handling, we need to declare all exceptions that we anticipate ...
Read now
Unlock full access