Background documentationCALL Statement (call_statement) Locate this document in the navigation structure

 

The CALL statement (call_statement) causes a database procedure to be executed.

Structure

Syntax Syntax

  1. <call_statement> ::=
      CALL <dbproc_name> [(<expression>,...)] [WITH COMMIT]
End of the code.
Examples

SQL Tutorial, Database Procedures

Explanation

The specified database procedure name must identify an existing database procedure. The current database user must have the EXECUTE privilege for the database procedure.

The number of expressions (expression) must be equal to the number of formal parameters for the database procedure. The data type of the ith expression must be compatible with the data type of the ith formal parameter for the database procedure.

If the ith formal parameter for the database procedure has the OUT or INOUT mode (see CREATE DBPROC statement), the corresponding expression must be a parameter specification.

WITH COMMIT

If WITH COMMIT is specified, the current transactions are terminated with COMMIT after the database procedure has been executed correctly. If execution of the database procedure fails, the current transaction is terminated with ROLLBACK.

More Information

GRANT Statement