Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.7 DECLARE CURSOR

Use the DECLARE CURSOR statement to define a cursor. The syntax of the statement is:
EXEC SQL [AT database_name] DECLARE cursor_name CURSOR FOR (select_statement | statement_name);
database_name is the name of the database on which the cursor operates. This value may take the form of an identifier or of a host variable. If you do not specify a database name, the default value of database_name is the default database.
cursor_name is the name of the cursor.
select_statement is the text of the SELECT statement that defines the cursor result set; the SELECT statement cannot contain an INTO clause.
statement_name is the name of a SQL statement or block that defines the cursor result set.

7 Reference : 7.5 ECPGPlus Statements : 7.5.7 DECLARE CURSOR

Table of Contents Previous Next