|
This section covers specific iSeries issues related to cursors. DECLARE CURSOR Statement in DB2 UDB for iSeriesThe DECLARE CURSOR statement in DB2 UDB for iSeries allows for additional options:
Figure 5.32 shows the complete syntax diagram for the statement in iSeries. Figure 5.32. The DECLARE CURSOR statement in DB2 UDB for iSeries..--ASENSITIVE----------------. .--NO SCROLL--. >>-DECLARE--cursor-name---+----------------------------+----+-------------+----> +--INSENSITIVE---------------+ '--SCROLL-----' | .--DYNAMIC--. | '--SENSITIVE--+-----------+--' .--WITHOUT HOLD--. .-WITHOUT RETURN----------------. >--CURSOR----+----------------+----+-------------------------------+-----------> '--WITH HOLD-----' | .--TO CALLER--. | '-WITH RETURN--+-------------+--' '--TO CLIENT--' >----FOR--+-select-statement-+----------------------------------------------->< '-statement-name---' The sensitivity specification indicates whether the cursor is sensitive to changes made to the data after the cursor is opened.
The scrollable specification indicates whether the cursor is scrollable.
The WITHOUT RETURN clause is also available to explicitly state that the cursor will not be returned to the CALLER and CLIENT. This is the default behavior on iSeries. |
|