Package components v17
Packages consist of two main components:
The package specification, which is the public interface. You can reference these elements outside the package. Declare all database objects that are a part of a package in the specification.
The package body, which contains the actual implementation of all the database objects declared in the package specification.
The package body implements the specifications in the package specification. It contains implementation details and private declarations that are invisible to the application. You can debug, enhance, or replace a package body without changing the specifications. Similarly, you can change the body without recompiling the calling programs because the implementation details are invisible to the application.
Package specification syntax
The package specification defines the user interface for a package (the API). The specification lists the functions, procedures, types, exceptions, and cursors that are visible to a user of the package.
The syntax used to define the interface for a package is:
Where authorization_clause
:=
Where procedure_or_function_declaration
:=
Where procedure_declaration
:=
Where function_declaration
:=
Where argument_list
:=
Where argument_declaration
:=
Where restriction_pragma
:=