Declares a cursor in a manner compatible with Adaptive Server Enterprise.
DECLARE cursor-name ... CURSOR FOR select-statement ... [ FOR { READ ONLY | UPDATE } ]
Sybase IQ supports a DECLARE CURSOR syntax that is not supported in Enterprise. For information on the full DECLARE CURSOR syntax, see DECLARE CURSOR statement [ESQL] [SP].
This section describes the overlap between the IQ and Adaptive Server Enterprise flavors of DECLARE CURSOR.
None.
SQL/92 Entry-level compliant. The FOR UPDATE and FOR READ ONLY options are Transact-SQL extensions.
Sybase There are some features of the Adaptive Server Enterprise DECLARE CURSOR statement that are not supported in Sybase IQ.
In the Sybase IQ dialect, a DECLARE CURSOR statement in a procedure or batch must immediately follow the BEGIN keyword. In the Transact-SQL dialect, there is no such restriction.
In Enterprise, when a cursor is declared in a procedure or batch, it exists for the duration of the procedure or batch. In Sybase IQ, if a cursor is declared inside a compound statement, it exists only for the duration of that compound statement (whether it is declared in a Sybase IQ or Transact-SQL compound statement).
None.