Cursor Position for Updates
The WHERE clause of the cursor version specifies the row to which the cursor currently points. The update affects only data in that row. Each column referenced in the SET clause must have been previously declared for updating in the DECLARE CURSOR statement.
The cursor must be pointing to a row (a fetch has been executed) before a cursor update is performed. The UPDATE statement does not advance the cursor; a fetch is required to move the cursor forward one row. Two cursor updates not separated by a fetch generally cause the same row to be updated twice if the cursor was opened in direct mode, or cause an error if the cursor was opened in deferred mode.
Last modified date: 08/29/2024