FETCH Cursor

In a stored procedure, fetch the next row of the cursor’s result set.

Syntax

FETCH cursor_name INTO fetch_target [, fetch_target ]... ]

Description

This retrieves the next row of the result set into the fetch_target list. The fetch_target list is a comma separated list of variables that have been previously declared using the VAR statement.

Use FETCH_STATUS to determine whether the fetch was successful or not.

Cursors in NuoDB SQL only support fetching in a forward direction.

Parameters

cursor_name

The name that was associated with the cursor using DECLARE.

fetch_target

A variable that has been previously declared using the VAR statement.