Collection Contents Index RESUME statement REVOKE statement pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

RETURN statement


Function 

To exit from a function or procedure unconditionally, optionally providing a return value. Statements following RETURN are not executed.

Syntax 

RETURN [ ( expression ) ]

Permissions 

None.

Side effects 

None.

See also 

CREATE FUNCTION statement

CREATE PROCEDURE statement

BEGIN... END statement

Description 

A RETURN statement causes an immediate exit from the function or procedure. If expression is supplied, the value of expression is returned as the value of the function or procedure.

Within a function, the expression should be of the same data type as the function's RETURNS data type.

RETURN is used in procedures for Transact-SQL-compatibility, and is used to return an integer error code.

Standards and compatibility 

Example 


Collection Contents Index RESUME statement REVOKE statement pdf/chap9.pdf