Oracle8i Supplied PL/SQL Packages Reference
Release 2 (8.1.6)

Part Number A76936-01





Go to previous page Go to next page


This reference manual describes the Oracle PL/SQL packages that are shipped with Oracle. Information in this manual applies to versions of the Oracle Server that run on all platforms unless otherwise specified.

See Also:

For information about Java packages, please refer to Oracle8i Supplied Java Packages Reference,  

This Preface includes the following sections:

Introduction to Packages

A package is a schema object that groups logically related PL/SQL types, items, and subprograms. Packages usually have two parts: a specification and a body, although sometimes the body is unnecessary. The specification is the interface to your applications; it declares the types, variables, constants, exceptions, cursors, and subprograms available for use. The body fully defines cursors and subprograms, and so implements the specification.

Unlike subprograms, packages cannot be called, parameterized, or nested. Still, the format of a package is similar to that of a subprogram:

CREATE PACKAGE name AS  -- specification (visible part)
   -- public type and item declarations
   -- subprogram specifications
END [name];

CREATE PACKAGE BODY name AS  -- body (hidden part)
   -- private type and item declarations
   -- subprogram bodies
   -- initialization statements]
END [name];

The specification holds public declarations that are visible to your application. The body holds implementation details and private declarations that are hidden from your application.

You can debug, enhance, or replace a package body without changing the interface (package specification) to the package body.

To create packages and store them permanently in an Oracle database, use the CREATE PACKAGE and CREATE PACKAGE BODY statements. You can execute these statements interactively from SQL*Plus or Enterprise Manager.

Only the declarations in the package specification are visible and accessible to applications. Implementation details in the package body are hidden and inaccessible. So, you can change the body (implementation) without having to recompile calling programs.

The advantages of using packages include modularity, ease of application design, information hiding, added functionality, and improved performance.

What's New in Oracle8i?

There are two sub-releases within Oracle8i, 8.1.5 and 8.1.6.

Release 8.1.5

This book was new for release 8.1.5.

Release 8.1.6

There are five new packages:

Oracle enhanced the following packages:


This manual is intended for anyone using or interested in Oracle packages. This book is also valuable to systems analysts, project managers, and others interested in the development and tuning of database applications.

This manual assumes you have a working knowledge of application programming and that you are familiar with the use of Structured Query Language (SQL) to access information in relational database systems.

Certain sections of this manual also assume a knowledge of the basic concepts of object oriented programming.

Related Documents

For more information, see the following manuals in the Oracle8i documentation set:


The following conventions are used in this manual:

Convention  Meaning 

. . .  

Horizontal ellipsis points in statements or commands mean that parts of the statement or command not directly related to the example have been omitted 


Uppercase text is used to call attention to package names, command keywords, database object names, filenames, and so on.  

Italicized Text 

Italicized words within text are book titles or emphasized words. 

Code Examples 

Commands or statements of SQL, PL/SQL, and SQL*Plus appear in a monospaced font.

For example:

INSERT INTO emp (empno, ename) VALUES (1000, 'SMITH'); 

< >  

Angle brackets enclose user-supplied names. 

[ ]  

Brackets enclose optional clauses from which you can choose one or none. 


The dollar sign represents the DIGITAL CommandLanguage prompt in OpenVMS and the Bourne shell prompt in Digital UNIX  

Go to previous page Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.