Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

EXECUTE PROCEDURE

Use the EXECUTE PROCEDURE statement to invoke a user-defined procedure. This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-EXECUTE PROCEDURE-------------------------------------------->
 
>--+-+-procedure------+--(--+-----------------------+--)--+-----------------------------+-+-><
   | |  (1)           |     | .-,-----------------. |     |              .-,----------. | |
   | +--------SPL_var-+     | V              (2)  | |     |  (1)         V            | | |
   | '-function-------'     '---| Argument |------+-'     '--------INTO----output_var-+-' |
   |  (3)    (4)                                (5)                                       |
   +---------------| SQLJ Built-In Procedures |-------------------------------------------+
   |  (3)    (6)                                   (7)                                    |
   '---------------| IFX_UNLOAD_MODULE Procedure |----------------------------------------'
 
Notes:
  1. Stored Procedure Language only
  2. See Arguments
  3. Dynamic Server only
  4. Java only
  5. See ***
  6. C only
  7. See IFX_REPLACE_MODULE Function (IDS, C)

Element Description Restrictions Syntax
function SPL function to execute Must exist Database Object Name
output_var Host variable or program variable that receives the returned value from UDR In the context of a CREATE TRIGGER statement, must contain column names in the triggering table or in another table Language specific
procedure User-defined procedure to execute Must exist Database Object Name
SPL_var Variable that contains the name of the SPL routine to execute Must be a character data type that contains the non-NULL name of an SPL routine. Identifier

Usage

The EXECUTE PROCEDURE statement invokes the named user-defined procedure and specifies its arguments.

In Dynamic Server, for backward compatibility, you can use the EXECUTE PROCEDURE statement to execute an SPL function that you created with the CREATE PROCEDURE statement.

In Extended Parallel Server, use the EXECUTE PROCEDURE statement to execute any SPL routine. Extended Parallel Server does not support the EXECUTE FUNCTION statement.

In ESQL/C, if the EXECUTE PROCEDURE statement returns more than one row, it must be enclosed within an SPL FOREACH loop or accessed through a cursor.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]