update (cursor command)

Description

Changes data in a row made current by a read cursor command, either by adding data or by modifying existing data.

Syntax

update [[database.]owner.]{table_name | view_name}
set column_name1 = @p1][, column_name2 = @p2]...

NoteAny valid object in the catalog can be substituted for table_name or view_name.

Parameters

set

specifies the column name and assigns the new value. The value passes as a cursor parameter.

Examples

Example 1

update authors 
 set au_lname = @p1

The row made current by the cursor authors_cursor is modified, and the column au_lname is set to the value of the parameter @p1.

Usage