Opens a cursor for processing.
open cursor_name
Usage
open opens a cursor. Cursors allow you to modify or delete rows on an individual basis. You must first open a cursor to use the fetch, update, and delete statements. For more information about cursors, see the Transact-SQL User’s Guide.
Adaptive Server returns an error message if the cursor is already open or if the cursor has not been created with the declare cursor statement.
Opening the cursor causes Adaptive Server to evaluate the select statement that defines the cursor (specified in the declare cursor statement) and makes the cursor result set available for processing.
When the cursor is first opened, it is positioned before the first row of the cursor result set.
When you set the chained transaction mode, Adaptive Server implicitly begins a transaction with the open statement if no transaction is currently active.
See Also
close, deallocate cursor, declare cursor, fetch in this chapter.
open in the Adaptive Server Reference Manual.