RETURN Statement

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

Quick Links:

Go to Parameters

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

RETURN [ ( expression ) ]

Parameters

(back to top)

Examples

(back to top)

Usage

(back to top)

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

Standards

(back to top)

  • SQL—ISO/ANSI SQL compliant.
  • SAP Sybase Database product—Transact-SQL procedures use the return statement to return an integer error code.

Permissions

(back to top)

None

Related reference
BEGIN … END Statement
CREATE PROCEDURE Statement