What Is a Named Program Unit

Q

What Is a Named Program Unit? - Oracle DBA FAQ - Understanding PL/SQL Language Basics

✍: FYIcenter.com

A

A named program unit is a PL/SQL code block with an name. It consists of three parts:

  • Declaration Part - Defining the program unit name, calling parameters, local variables and local procedures. Declaration part is required.
  • Execution Part - Defining execution logic with executable statements. Execution part is required.
  • Exception Part - Defining error handling logics. Exception part is optional.

There are two types of named program units:

  • Procedure - Has no return values.
  • Function - Has a return value.

2007-04-30, 5337👍, 0💬