Press "Enter" to skip to content

How to Create Package in Oracle SQL Developer?

Follow these steps to create Package in Oracle SQL developer.

  1. On the left side in the connections pane, click on the Schema and expand the node.
  2. Then from the list of object types, select the Packages node.
  3. Do the right click on it and from the shortcut menu select New Package option.
  4. Then a Create Package window will appear.
  5. Specify the name for the package in the Name field.
  6. Then click on the OK button and the package will be open in the SQL editor. Below is an example package code.
CREATE OR REPLACE 
PACKAGE EMP_PACKAGE AS

/* TODO enter package declarations (types, exceptions, methods etc) here */

END EMP_PACKAGE;

The above part is a specification for the package. To create a package body, open another SQL editor window and create the package body, as shown in below example.

CREATE OR REPLACE 
PACKAGE BODY EMP_PACKAGE AS

/* TODO enter package declarations (types, exceptions, methods etc) here */

END EMP_PACKAGE;

See also: