EasyManua.ls Logo

Sybase Adaptive Server Anywhere - CALL Statement

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CALL statement
410
CALL statement
Use this statement to invoke a procedure.
[
variable
= ] CALL
procedure-name
( [
expression
, … ] )
[
variable
= ] CALL
procedure-name
( [
parameter-name
=
expression
, … ] )
Must be the owner of the procedure, have EXECUTE permission for the
procedure, or have DBA authority.
None.
"CREATE PROCEDURE statement" on page 453
"GRANT statement" on page 540
"EXECUTE statement" on page 516
"Using Procedures, Triggers, and Batches" on page 435 of the book ASA
User’s Guide
The CALL statement invokes a procedure that has been previously created
with a CREATE PROCEDURE statement. When the procedure completes,
any INOUT or OUT parameter values will be copied back.
The argument list can be specified by position or by using keyword format.
By position, the arguments will match up with the corresponding parameter
in the parameter list for the procedure. By keyword, the arguments are
matched up with the named parameters.
Procedure arguments can be assigned default values in the CREATE
PROCEDURE statement, and missing parameters are assigned the default
value or. If no default is set, and an argument is not provided, an error is
given.
Inside a procedure, a CALL statement can be used in a DECLARE statement
when the procedure returns result sets (see "Returning results from
procedures" on page 466 of the book ASA User’s Guide).
Procedures can return an integer value (as a status indicator, say) using the
RETURN statement. You can save this return value in a variable using the
equality sign as an assignment operator:
CREATE VARIABLE returnval INT;
returnval = CALL proc_integer ( arg1 = val1, ... )
$ For information on returning non-integer values, see "CREATE
FUNCTION statement" on page 445.
SQL/92 Persistent Stored Module feature.
Sybase Not supported by Adaptive Server Enterprise. For an
alternative that is supported, see "EXECUTE statement" on page 516.
Function
Syntax 1
Syntax 2
Permissions
Side effects
See also
Description
Standards and
compatibility

Table of Contents

Related product manuals