declare cursor

Description

Defines a cursor.

Syntax

declare cursor_name cursor
 for select_statement
[for {read only | update [of column_name_list]}]

Usage

If the cursor specified by cursor_name contains references to proxy tables, Adaptive Server notifies Component Integration Services to establish a connection to the remote servers referenced by the proxy tables.

A separate connection is required for each server represented by all proxy tables. For example, if all proxy tables in the cursor reference the same remote server, only one connection is required while the declare cursor command is processed. However, if two or more servers are referenced by the proxy tables, a separate connection to each server is required.

See also

close, deallocate cursor, fetch, open in this chapter

declare cursor in the Reference Manual