Changes data in a row made current by a read cursor by adding data or modifying existing data (cursor event).
Transact-SQL Syntax
update [[database.]owner.]{table_name | view_name}
set [[[database.]owner.]{table_name. | view_name.}] column_name1 = {expression1 | NULL | (select_statement)} [, column_name2 = {expression2 | NULL | (select_statement)} where current of cursor_name
ODBC Syntax
UPDATE table_name
SET column_idenfifier={expression|NULL} [,column_identifier={expression|NULL}]...
WHERE CURRENT OF cursor_name
specifies the column name and assigns the new value. The value is passed as a cursor parameter.
causes ASE to update the row of the table or view indicated by the current cursor position for cursor_name.
update authors
set au_lname = @p1
The row made current by the cursor authors_cursor is modified. The column au_lname is set to the value of the parameter @p1.
Any valid object in the catalog can be substituted for table_name, view_name, and so forth.
ASE/CIS issues a cursor update request if it must examine any column data to fulfill the client request, subject to these conditions:
More than one table is involved in the update statement.
The statement contains built-in functions in its where clause.
A column name is referenced to the right of any set expression.
ASE/CIS passes the update command to the DirectConnect server as this series of cursor commands:
declare (define parameter formats)
open (define parameter data)
close
deallocate
The cursor can be reused multiple times before it is deallocated.
Upon completion of the update command, the number of rows affected must be indicated.
ODBC does not support a from clause in the update statement. The access service ignores the from clause.