O'Reilly logo

Oracle® PL/SQL® Interactive Workbook, Second Edition by Elena Silvestrova, Benjamin Rosenzweig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lab 7.2 Built-In Exceptions

Lab Objectives

After this Lab, you will be able to:

Use Built-In Exceptions

As mentioned earlier, a PL/SQL block has the following structure:

DECLARE 
   … 
BEGIN 
   EXECUTABLE STATEMENTS; 
EXCEPTION 
   WHEN EXCEPTION_NAME THEN 
      ERROR-PROCESSING STATEMENTS; 
END; 

When an error occurs that raises a built-in exception, the exception is said to be raised implicitly. In other words, if a program breaks an Oracle rule, control is passed to the exception-handling section of the block. At this point, the error-processing statements are executed. It is important for you to realize that after the exception-handling section of the block has executed, the block terminates. Control will not return to the executable section of the block. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required