background image
<< Modifying a Package | Dropping a Package >>
<< Modifying a Package | Dropping a Package >>

Creating a Package Body

Creating and Using Packages
Developing and Using Stored Procedures 4-13
1.
In the Connections navigation hierarchy, select Packages, and then right-click
emp_eval
.
2.
Select Edit.
3.
In the
EMP_EVAL
pane, edit the package. The new code is in bold font.
create or replace
PACKAGE emp_eval AS
PROCEDURE eval_department(department_id IN NUMBER);
FUNCTION calculate_score(evaluation_id IN NUMBER
, performance_id IN NUMBER)
RETURN NUMBER;
END emp_eval;
4.
Compile the package specification.
You will see the following message that confirms that the package compiled
correctly.
EMP_EVAL Compiled.
To create a package body:
You will create a package body for
emp_eval
by specifying some functions and
procedures.
1.
In the Connections navigation hierarchy, right-click
emp_eval
.
2.
Select Create Body.
3.
In the
emp_eval
Body pane, you can see the automatically generated code for the
package body.