Previous Topic: RESIGNALNext Topic: SET Assignment


RETURN

The RETURN statement returns a value for an SQL function. As an extension to the SQL standard, a RETURN without parameters can also be used to exit a compound statement.

Syntax
►── RETURN ────┬────────────────────┬─────────────────────────────────────────►◄
               ├─ NULL ─────────────┤
               └─ value-expression ─┘
Parameters
NULL

Specifies that the function return value is NULL.

value-expression

Specifies the function return value.

Usage

Compatible Data Types

The data type of the value-expression and the data type of the function return value named in the CREATE FUNCTION statement must be compatible for assignment.

Example

For an example, see CREATE FUNCTION.