Creating a Procedure or Function With the SQL Commands Page

Previous
Previous
Next
Next

You can use the SQL Commands page to create stored procedures or functions.

To create a procedure or function with the SQL Commands page:

  1. Log in to the Database Home Page. See "Logging in to the Database Home Page".

  2. On the home page, click the SQL icon to display the SQL page.

  3. Click the SQL Commands icon to display the SQL Commands page.

  4. On the SQL Commands page, enter the PL/SQL code for the PL/SQL procedure or function. You can use the code in Example: Creating a Simple Stored Procedure.

  5. Select (highlight) the code for creating the procedure or function, then click the Run button to create the procedure or function.

  6. Select (highlight) the code for calling the procedure or function, then click the Run button to call the procedure or function.

  7. If you want to save the PL/SQL code for future use, click the Save button.

  8. In the Name field, enter a name for the saved PL/SQL code. You can also enter an optional description. Click the Save button to save the code.

  9. 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.

In the previous steps you created a procedure. For information about how to execute or call a procedure, see "Calling Stored Procedures or Functions".