CALL

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide >

CALL

Previous pageReturn to chapter overviewNext page

Call a system procedure or user-defined procedure (UDP). See also CREATE PROCEDURE, DROP PROCEDURE, Built In Functions.

If the qualified-procedure-name is not fully specified, SQL:2008 mandates that the procedure will be searched for in the catalog(s) and schema(s) specified by SET PATH.

Syntax

CALL <qualified-procedure-name> ( [ <value-expression> {, <value-expression>} ] )

<qualified-procedure-name> :=   [ catalog-name.[schema-name.[procedure-name]]]

Example

CALL SYS_ROOT.KILL_SESSION(101);

 

You can invoke a CALL statement from JDBC by calling the java.sql.Statement.execute(String sql) method; or you call the java.sql.Connection.prepareCall(String sql) method and invoke the resulting java.sql.CallableStatement several times. (KILL SESSION is described in the s-Server Admin Guide.

In contrast to a procedure, a function or user-defined function (UDF) returns a result and cannot be called via CALL. To invoke a function, use a simple query:

VALUES (celsius_to_fahrenheit(100));

EXPR$0

======

   212