2 Day Developer > Using Procedures, Functions... > Managing Packages > Creating Packages in the SQ...
Creating Packages in the SQL Commands Page |
Previous |
Next |
To create and run a package specification or body in the SQL Commands page:
Log in to the Database Home Page. See "Logging in to the Database Home Page".
On the home page, click the SQL icon to display the SQL page.
Click the SQL Commands icon to display the SQL Commands page.
On the SQL Commands page, enter the PL/SQL code for the package specification or body. Use the code in Example: Creating a Package Specification.
Click the Run button to create the package specification or body. If necessary, select (highlight) only the specific code for creating the package specification or body before clicking the Run button. Any comments outside the package or package body block are not legal in the SQL Commands page.
If you want to save the PL/SQL code for future use, click the Save button.
In the Name field, enter a name for the saved PL/SQL code (emp_actions_pkg_spec
). You can also enter an optional description. Click the Save button to save the code.
To access saved PL/SQL code, click the Saved SQL tab and select the name of the saved PL/SQL code that you want to access.
To create, run, and save the PL/SQL code for a package body, repeat the steps in this example with the code in Example: Creating a Package Body.
In the previous steps you created a package. For information about how to execute or call a subprogram in the package, see "Calling Procedures and Functions in Packages".
See Also: Oracle Database Express Edition Application Express User's Guide for detailed information about using SQL Scripts |