SQL Reference

RETURN Statement

The RETURN statement is used to return from the routine. For SQL functions or methods, it returns the result of the function or method. For an SQL procedure, it optionally returns an integer status value.

Syntax

>>-RETURN--+------------+--------------------------------------><
           '-expression-'
 

Description

expression
Specifies a value that is returned from the routine:

Notes

Examples

Use a RETURN statement to return from an SQL stored procedure with a status value of zero if successful, and -200 if not.

   BEGIN
   ...
      GOTO FAIL
   ...
      SUCCESS: RETURN 0
      FAIL: RETURN -200
   END


[ Top of Page | Previous Page | Next Page ]