2.4 Running Functions and Procedures

You can open and run PL/SQL subprograms (functions and procedures).

  • To open a subprogram, click the name in the Connections panel to open, or right-click and select Open.

  • To compile a subprogram, open it in the SQL Worksheet, and then select the Compile icon in the top right corner.

    To debug a subprogram, open it in the SQL Worksheet, and then select the Compile for Debug icon.

    If there are any issues during compilation, these are shown under the Script Output tab in the lower pane.

To run a subprogram, right-click the name in the Connections panel and select Run. You can then view the PL/SQL code and edit if needed, and then click Run. The results are displayed in the Script Output pane below.

In the following figure, the REFCURSOR_FUNCTION is run and the output is displayed below.

Running subprogram