DECLARE Cursor

Declare a cursor in a stored procedure, user defined function or trigger.

Syntax

DECLARE cursor_name CURSOR [ WITHOUT HOLD | WITH HOLD ] 
    FOR query_expression [ FOR { UPDATE | READ ONLY } ]

Description

Declare a cursor variable and bind it to a query definition, query_expression. Using cursors allows for fetching and processing query result set, one row at a time.

Declaring the cursor does not actually execute the query. Opening the cursor will actually run the query and populate the cursor. See OPEN Cursor.

In this release of NuoDB, the cursor is as sensitive as possible to insert, update, or delete operations made to the underlying rows of the result set by other database sessions.

Parameters