Tell Me
 

Creating a PL/SQL Block: Part 2

Previous previous|next Next Page


A PL/SQL program comprises one or more blocks. These blocks can be entirely separate or nested within another.

There are three types of blocks that make up a PL/SQL program:

  • Anonymous blocks: These are the unnamed PL/SQL blocks that are embedded within an application or are issued interactively.
  • Procedures: These are the named PL/SQL blocks. These blocks accept inbound parameters but won't explicitly return any value.
  • Functions: These are the named PL/SQL blocks. These blocks accept inbound parameters and will always return a value.

The difference between a procedure and a function is that a function must return a value to the calling program.