Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Stored procedures, triggers, batches, and user-defined functions » Result sets


Returning a value using the RETURN statement

The RETURN statement returns a single integer value to the calling environment, causing an immediate exit from the procedure.


There are no prerequisites for this task.

  1. Execute the following statement:

    RETURN expression
  2. The value of the supplied expression is returned to the calling environment. Use an extension of the CALL statement to save the return value in a variable:

    returnval = CALL variable/procedure-name? myproc();


A value is returned and saved as a variable.

 See also