Your browser does not support JavaScript. This help page requires JavaScript to render correctly. Tutorial: Creating a Package Specification
Skip Headers
Previous
Previous
 
Next
Next

Tutorial: Creating a Package Specification

To create a package specification, use either the SQL Developer tool Create PL/SQL Package or the DDL statement CREATE PACKAGE.

This tutorial shows how to use the Create PL/SQL Package tool to create a specification for a package named EMP_EVAL.

This package specification is the API for the sample application that the tutorials and examples in this document show how to develop and deploy.

To create a package specification using Create PL/SQL Package tool:

  1. On the Connections tab, expand hr_conn.

    Under the hr_conn icon, a list of schema object types appears.

  2. Right-click Packages.

    A list of choices appears.

  3. Click New Package.

    The Create PL/SQL Package window opens. The field Schema has the value HR, the field Name has the default value PACKAGE1, and the check box Add New Source In Lowercase is deselected.

  4. For Schema, accept the default value, HR.

  5. For Name, change PACKAGE1 to EMP_EVAL.

  6. Click OK.

    The EMP_EVAL pane opens, showing the CREATE PACKAGE statement that created the package.

    The title of the pane is in italic font, which indicates that the package is not saved to the database.

  7. (Optional) In the CREATE PACKAGE statement, replace the comment with declarations.

    If you do not do this step now, you can do it later, as shown in "Tutorial: Changing a Package Specification".

  8. From the File menu, select Save.

    Oracle Database compiles the package and saves it. The title of the EMP_EVAL pane is no longer in italic font.

Related Topics

Oracle Database PL/SQL Language Reference

Creating and Managing Packages