Navigation:  NexusDB Guide > SQL Reference > SQL Statements > Data Statements >

DECLARE CURSOR statement

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

DECLARE CURSOR statement

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > SQL Statements > Data Statements

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"

 

© Nexus Database Systems Pty Ltd.

nexus_logo