Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
PL/SQL blocks come in two types: anonymous (or unnamed) and named blocks. Anonymous block programs have a fixed scope, while named blocks are more extensible resources. Named blocks are stored programs in an Oracle database.
You can use anonymous block programs in scripts or nested inside other program units. They have scope only in the context of the program unit or script where you put them. You can't call anonymous blocks from other blocks by name, because they haven't got a name. All variables are passed to these local blocks by reference, which is the default in PL/SQL's scope model. This means an anonymous block program unit can reference any variables in the external or calling scope. The single exception to this rule occurs when you declare a local variable that replaces a calling scope variable.