Example of Creating a Procedure

In this example, create a procedure to determine the table values.

To create a procedure, select the Create > Procedure context menu item at the right part of the object navigator dialog box.

Use the Basic Properties page to specify the object’s standard parameters:

Go to the next wizard page.

Use this page to specify the following parameters:

Name Identifier Data type Select the checkbox
Input PIN Integer Input
Input2 PIN2 Integer Input
Input3-Output PINOUT Integer Input, Output

Click the Add button to add parameters. The Object Parameter Properties dialog box for the Input parameter looks as follows:

Click the Next button to go to the next wizard page:

Use this page to specify the following parameters:

(PIN in number, PIN2 in varchar2, PINOUT in out varchar2)

    is

        begin

            insert into EXECPR (field, field1, field2) values (PIN,PIN2, PINOUT);

        end;

where:

After all the parameters are specified, click the Next button and then, on the Final Step page, click the Finish button:

To launch the created procedure, select the Open context menu item. The dialog box to set parameters opens after that:

Determine the required values and click the OK button. If the procedure or function is successfully executed, an appropriate message is displayed showing the user the results of procedure or function. This message box enables the user to open a text field that shows values of input and output parameters:

The Copy To Clipboard item copies contents of the text field to the clipboard.

See also:

Procedure