RESUME Statement

Resumes a procedure after a query.

Syntax

Syntax 1

RESUME cursor-name

Syntax 2

RESUMEALL ]

Parameters

Examples

Usage

The RESUME statement resumes execution of a procedure that returns result sets.

The procedure executes until the next result set (SELECT statement with no INTO clause) is encountered. If the procedure completes and no result set is found, the SQLSTATE_PROCEDURE_COMPLETE warning is set. This warning is also set when you RESUME a cursor for a SELECT statement.

Note:

The Syntax 1 RESUME statement is supported in dbisqlc, but is invalid in dbisql (Interactive SQL) or when connected to the database using the iAnywhere JDBC driver.

The dbisql RESUME statement (Syntax 2) resumes the current procedure. If ALL is not specified, executing RESUME displays the next result set or, if no more result sets are returned, completes the procedure.

The dbisql RESUME ALL statement cycles through all result sets in a procedure, without displaying them, and completes the procedure. This is useful mainly in testing procedures.

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

The cursor must have been previously opened.

Related reference
DECLARE CURSOR Statement [ESQL] [SP]