Using a dynamic command, update changes data in existing rows of the referenced table.
update [[database.]owner.]{table_name | view_name} set column_name1 = ? [, column_name2 = ?]... [ where search_conditions...] ]
specifies the column name and assigns the new value. The value passes as a parameter.
is a standard where clause.
sets the conditions for the rows that are retrieved. A search condition can include column names, constants, joins, the keywords is null, is not null, or, like, and, or any combination of these items.
update authors set au_lname = ? where au_id = ?
The au_lname column is set to the value of <parameter 1> (indicated by a “?”), where the value of au_id is equal to the value of <parameter 2> (indicated by the second “?”).
You can include a from clause in the update statement, but because DB2 does not support it, the DB2 access service ignores it.
You can substitute table_name and view_name with any valid object in the catalog.
The following relational operators are supported in search conditions: =, <>, <, >, <=, >=, and LIKE.
Copyright © 2005. Sybase Inc. All rights reserved. |