ALLBASE/SQL Reference Manual (36216-90216)

Chapter 12 587
SQL Statements S - Z
UPDATE WHERE CURRENT
UPDATE WHERE CURRENT
The UPDATE WHERE CURRENT statement updates the values of one or more columns in the
current row associated with a cursor. The current row is the row pointed to by a cursor
after the FETCH or REFETCH statement is issued.
Scope
Application Programs Only
SQL Syntax
UPDATE {[
Owner.
]
TableName
[
Owner.
]
ViewName
}
SET {
ColumnName
= {
Expression
‘LongColumnIOString’
NULL }}[,...]
WHERE CURRENT OF
CursorName
Parameters
[
Owner
.]
TableName
specifies the table to be updated.
[
Owner
.]
ViewName
specifies a view; the table on which the view is based is
updated. Refer to the CREATE VIEW statement for
restrictions governing updates via views.
ColumnName
designates a column to be updated. You can update several
columns of the same table with a single UPDATE WHERE
CURRENT statement.
Expression
is any expression that does not contain an aggregate
function or a LONG column (except via a long column
function). The data type of the expression must be
compatible with the column's data type.
'
LongColumnIOString
' specifies the input and output locations for the LONG
data. The syntax for this string is presented in a separate
section below.
NULL puts a null value in the specified column. The column
must allow null values.
CursorName
designates an opened cursor. The current row of the cursor
is updated as specified by the SET clause. The column(s)
named in the SET clause must also be named in the FOR
UPDATE clause of the DECLARE CURSOR statement
defining the cursor. After the update, the row updated
remains the current row.