Blocks (PL/SQL)

PL/SQL block structures can be included within PL/SQL procedure, function, or trigger definitions or executed independently as an anonymous block statement.

PL/SQL block structures and the anonymous block statement contain one or more of the following sections:
  • An optional declaration section
  • A mandatory executable section
  • An optional exception section
These sections can include SQL statements, PL/SQL statements, data type and variable declarations, or other PL/SQL language elements.