Welcome to our free Oracle PL/SQL tutorial. This tutorial is based on Webucator's Oracle PL/SQL Training course.
You have already been introduced to PL/SQL blocks. Blocks are the fundamental structure within which PL/SQL code is written. They can be nested inside of each other to organize code, to limit variable scope or visibility, or to affect exception handling. Scope is the context in which a given variable can be accessed within a program. Scope is relevant when considering where a variable will be declared and where it will be referenced. Depending upon where it is declared, a variable might be accessible using its name, accessible using a qualified name or not accessible at all. Both traditional variables and exceptions are affected by scope considerations. In addition, the use of the EXCEPTION section of a block can affect the way errors are handled by your program.