Chapter 9 SQL Statements
637
UPDATE statement
Use this statement to modify existing rows in database tables.
UPDATE [ FIRST | TOP
n
]
table-list
… SET
set-item
, …
… [ FROM
table-list
]
… [ WHERE
search-condition
]
… [ ORDER BY
expression
[ ASC | DESC ], … ]
UPDATE
table-list
… SET
set-item
, …
… [ VERIFY (
column-name
, … ) VALUES (
expression
, … ) ]
… [ WHERE
search-condition
]
… [ ORDER BY
expression
[ ASC | DESC ], … ]
UPDATE
table
…PUBLICATION
publication
…{ SUBSCRIBE BY
expression
| OLD SUBSCRIBE BY
expression
NEW SUBSCRIBE BY
expression
}
…WHERE
search-condition
set-item:
column-name
[.
field-name
…] =
expression
|
column-name
[.
field-name
…].
method-name
( [
expression
] )
Must have UPDATE permission for the columns being modified.
None.
"DELETE statement" on page 496
"INSERT statement" on page 554
"FROM clause" on page 532
"Joins: Retrieving Data from Several Tables" on page 195 of the book ASA
User’s Guide
Syntax 1 of the UPDATE statement modifies values in rows of one or more
tables. Syntax 2 and 3 are applicable only to SQL Remote.
Syntax 2 is intended for use with SQL Remote only, in single-row updates
executed by the Message Agent. The VERIFY clause contains a set of values
that are expected to be present in the row being updated. If the values do not
match, any RESOLVE UPDATE triggers are fired before the UPDATE
proceeds. The UPDATE does not fail simply because the VERIFY clause
fails to match.
Syntax 3 of the UPDATE statement is used to implement a specific
SQL Remote feature, and is to be used inside a BEFORE trigger.
Function
Syntax 1
Syntax 2
Syntax 3
Permissions
Side effects
See also
Description