3.5 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, open it in the SQL Worksheet and then select the Run icon. 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.

The Run, Compile and Compile for Debug icons are also available when opening PL/SQL files with any of the following extensions, KLR, PKB, PKH, PKS, PLB and PLS, from your local device.

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