Declare one or more CURSOR variables.


Syntax

<SQL cursor declaration> ::=

DECLARE <SQL cursor name list> CURSOR FOR <SELECT Statement>

<SQL cursor name list> ::= cursor-name [ { , cursor-name }... ]


Usage

The DECLARE CURSOR statement is used to declare SQL cursors. Cursors can be opened, closed and queried via the fetch statement.


Notes

SQL cursor names shall conform to the rules for identifiers in NexusDB SQL.
One ore more SQL cursor can be declared with the same data type.
Cursors in V3 are read-only.
Cursors in V3 do not support dynamic statements.


Examples

13) Declare a cursor for a select statement:

       DECLARE studentCursor CURSOR FOR SELECT * FROM STUDENT;


Conformance

SQL:2003 standard

-

Feature F431 "Read-only scrollable cursor"

Home | Site Contents | Documentation | NexusDB Manual V4 | SQL Reference | SQL Statements | Data Statements