Unit 9.3. Packages

Using Packages

A package is a collection of PL/SQL objects grouped together under one package name. Packages include procedures, functions, cursors, declarations, types, and variables.

The Benefits of Using Packages

There are numerous benefits of using packages as a way to bundle your functions and procedures. A well-designed package is a logical grouping of objects such as functions, procedures, global variables, and cursors. All of the code is loaded on the first call of the package. In a stateful transaction this means that the first call to the package is very expensive (this does not mean it will cost you a lot of money, the expense is in processing of CPU, memory, etc.), but all subsequent calls will result in an improved ...

Get Oracle® Web Application Programming for PL/SQL® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.