Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E25519-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
LNPLS01336

Procedure Declaration and Definition

A procedure is a subprogram that performs a specific action. A procedure invocation (or call) is a statement.

Before invoking a procedure, you must declare and define it. You can either declare it first (with procedure_declaration) and then define it later in the same block, subprogram, or package (with procedure_definition) or declare and define it at the same time (with procedure_definition).

A procedure declaration is also called a procedure specification or procedure spec.

Note:

This topic applies to nested procedures. For information about standalone procedures, see "CREATE PROCEDURE Statement". For information about package procedures, see "CREATE PACKAGE Statement".

LNPLS1766Topics

Syntax

LNPLS1278procedure_declaration ::=

Description of procedure_declaration.gif follows
Description of the illustration procedure_declaration.gif

LNPLS1279procedure_heading ::=

Description of procedure_heading.gif follows
Description of the illustration procedure_heading.gif

See "parameter_declaration ::=".

LNPLS1280procedure_definition ::=

Description of procedure_definition.gif follows
Description of the illustration procedure_definition.gif

See:

Semantics

LNPLS1767procedure_declaration

Declares a procedure, but does not define it. The definition must appear later in the same block, subprogram, or package as the declaration.

LNPLS1768procedure_heading

LNPLS1769procedure

Name of the procedure that you are declaring or defining.

LNPLS1770procedure_definition

Either defines a procedure that was declared earlier or both declares and defines a procedure.

LNPLS1771declare_section

Declares items that are local to the procedure, can be referenced in body, and cease to exist when the procedure completes execution.

LNPLS1772body

Required executable part and optional exception-handling part of the procedure.

LNPLS1773call_spec, EXTERNAL

See"call_spec" and "EXTERNAL".

LNPLS1774Restriction on call_spec, EXTERNAL These clauses can appear only in a package specification or package body.

Examples

Related Topics

LNPLS1775In this chapter:

LNPLS1776In other chapters:

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF