UPDATE Where Current of Cursor

Description

Updates the row in which the cursor is positioned using the values in SetStatement.

Syntax

UPDATE TableName SetStatement 
	WHERE CURRENT OF CursorName ;

Parameter

Description

TableName

The name of the table in which you want to update the row

SetStatement

The word SET followed by a comma-separated list of the form ColumnName = value

CursorName

The name of the cursor in which the table is referenced

Usage

The USING Transaction Object clause is not allowed with UPDATE Where Current of Cursor; the transaction object was specified in the statement that declared the cursor.

Examples

Example 1

This statement updates the row in the Employee table in which the cursor called Emp_curs is positioned:

UPDATE Employee

		SET salary = 17800

		WHERE CURRENT of Emp_curs ;