Your browser does not support JavaScript. This help page requires JavaScript to render correctly. Tutorial: Testing a Standalone Stored Function
Skip Headers
Previous
Previous
 
Next
Next

Tutorial: Testing a Standalone Stored Function

This tutorial shows how to use the SQL Developer tool Run to test the standalone stored function calculate_score (created in "Tutorial: Creating a Standalone Stored Function").

To test the calculate_score function using the Run tool:

  1. On the Connections tab, expand hr_conn.

    Under the hr_conn icon, a list of schema object types appears.

  2. Expand Functions.

    A list of functions appears.

  3. Right-click calculate_score.

    A list of choices appears.

  4. Click Run.

    The Run PL/SQL window opens. Its PL/SQL Block frame includes this code:

    v_Return := calculate_score (
        CAT => CAT,
        SCORE => SCORE,
        WEIGHT => WEIGHT
      );
    
  5. Change the values of SCORE and WEIGHT to 8 and 0.2, respectively:

    v_Return := calculate_score (
        CAT => CAT,
        SCORE => 8,
        WEIGHT => 0.2
      );
    
  6. Click OK.

    The Running - Log window opens, showing this result:

    Connecting to the database hr_conn.
    v_Return = 1.6
    Process exited.
    Disconnecting from the database hr_conn.
    

Related Topics

Oracle Database SQL Developer User's Guide

Creating and Managing Standalone Stored Subprograms