The positioned UPDATE statement updates the current row of a rowset associated with an SQL cursor.
Note: Even though positioned UPDATE is allowed at the session level, the DECLARE CURSOR statement is not. Use the SQLGetCursorName() API to obtain the cursor name of the active result set.
The
table-name may be specified in the positioned
UPDATE statement only when used at the session level.
Table-name cannot be specified with a stored procedure or trigger.
The following sequence of statements provide the setting for the positioned UPDATE statement. The required statements for a positioned
UPDATE are
DECLARE CURSOR, OPEN CURSOR, and
FETCH FROM cursorname.
The positioned UPDATE statement in this example updates the name of the course HIS 305 to HIS 306.