RDB/VMS SQL UPDATE — VMS RDB_4.2
UPDATE ─┬─> table-name ─┬─┬─────>───────────────┬─┐ └─> view-name ──┘ └─> correlation-name ─┘ │ ┌───────────────────────────────────────────────┘ └─>
S
E
T ─┬─> column-name = ─┬─> value-expr ─┬─┬─┐ │ └─> typebox (N)typebox (U)typebox (L)typebox (L) ───────┘ │ │ └────────────── , <──────────────────┘ │ ┌──────────────────────────<────────────────────┘ └┬──────────────────>─────────────────────┬───────> typebox (;) └─>
W
H
E
R
E ─┬─> predicate ──────────────┬─┘ └─>
C
U
R
R
E
N
T
O
F cursor-name ─┘
Additional information available:
More Information
The UPDATE statement modifies a row or rows in a table or view.
SET
The SET clause specifies which columns in the table or view get what values. For each column you want to modify, you must specify the column name and either a value expression or the NULL keyword. SQL assigns the value following the equal sign to the column preceding the equal sign.
WHERE
The WHERE clause specifies the rows of the target table or view that will be modified according to the values indicated in the SET clause. If you omit the WHERE clause, SQL modifies all rows of the target table or view. You can either specify a predicate or a cursor name in the WHERE clause. If the WHERE clause includes a predicate, all the rows of the target table for which the predicate is true are modified. The columns named in the predicate must be columns of the target table or view. The target table cannot be named in a column select expression within the predicate. If the WHERE clause uses CURRENT OF cursor-name, SQL modifies only the row on which the named cursor is positioned.