DB2 Version 10.1 for Linux, UNIX, and Windows

Procedure references (PL/SQL)

Invocation references to PL/SQL procedures within PL/SQL contexts can be compiled by the DB2® data server.

A valid PL/SQL procedure reference consists of the procedure name followed by its parameters, if any.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-procedure-name--+-------------------------------+-----------><
                   |    .-,-------------------.    |   
                   |    V                     |    |   
                   '-(----+-----------------+-+--)-'   
                          '-parameter-value-'          

Description

procedure-name
Specifies an identifier for the procedure.
parameter-value
Specifies a parameter value. If no parameters are to be passed, the procedure can be called either with or without parentheses.

Example

The following example shows how to call a PL/SQL procedure within a PL/SQL context:
BEGIN
    simple_procedure;
END;

After a PL/SQL procedure has been created in a DB2 database, it can also be called using the CALL statement, which is supported in DB2 SQL contexts and applications using supported DB2 application programming interfaces.