CALL (Procedure)

The CALL (PROCEDURE) statement is used to call stored procedures.

When you call a stored procedure, the default schema and role are the same as were in effect when the procedure was created.

Syntax

CALL procedure-Name (
        [ expression [, expression]* ]
)

procedure-Name

The name of the procedure that you are calling.

expression(s)

Arguments passed to the procedure.

Example

The following example depends on a fictionalized java class. For functional examples of using CREATE PROCEDURE, please see the Using Functions and Stored Procedures section in our Developer’s Guide.

splice> CREATE PROCEDURE SALES.TOTAL_REVENUE(IN S_MONTH INTEGER,
    IN S_YEAR INTEGER, OUT TOTAL DECIMAL(10,2))
    PARAMETER STYLE JAVA
      READS SQL DATA LANGUAGE JAVA EXTERNAL NAME
       'com.example.sales.calculateRevenueByMonth';
splice> CALL SALES.TOTAL_REVENUE(?,?,?);

See Also