4-12. Executing Packaged Procedures and Functions

Problem

You want to execute one of the procedures or functions contained within a package.

Solution

Use the package_name.object_name notation to execute a particular code object within a package. For instance, the following block of code executes the GRANT_RAISES procedure that is contained within the PROCESS_EMPLOYEE_TIME package.

BEGIN     process_employee_time.grant_raises(.03,4000);   END;

The previous code block executes the GRANT_RAISES function, passing .03 for the percentage of increase and 4000 for the upper bound.

How It Works

Dot notation is used for accessing members of a package. Similar to other languages such as Java, dot notation can be used to access any publically accessible ...

Get Oracle and PL/SQL Recipes: A Problem-Solution Approach 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.