Local or Nested Modules
A local or nested module is a procedure or function that is defined in the declaration section of a PL/SQL block (anonymous or named). This module is considered local because it is defined only within the parent PL/SQL block. It cannot be called by any other PL/SQL blocks defined outside that enclosing block.
PROCEDURE show_date (date_in IN DATE) IS
DBMS_OUTPUT.PUT_LINE (TO_CHAR (date_in, 'Month DD, YYYY'); END show_date;
|Local or Nested Modules|||||619|
To improve the readability of your code
Even if you do not repeat sections of code within a module, you still may want to pull out a set of related statements and package them into a local module. This can make it easier to follow the logic of the main body of the parent module.
The following sections examine these benefits.