picoSQL - Language reference manual |
Syntax: |
UPDATE table-name SET column-name = {expression | NULL} [, column-name = {expression | NULL}] ... [ WHERE {search-condition |CURRENT OF cursor-name}]
|
Purpose: |
To modify one or more rows of a table.
|
See also: |
INSERT, DELETE, SELECT
|
Description:
|
This command is used to modify rows of one table. Each named column is set to the value of the expression (or NULL) on the right side of the equal sign. Even column-name can be used in the expression, the old value will be used. WHERE clause allows to modify only those rows which satisfy the search condition. If the WHERE clause is not specified, all the rows in the table will be updated. The CURRENT OF clause can be used, instead of the search condition, to update only the current row read by a cursor. However, this clause can be used only from a program language because a cursor name can be gotten or set only calling an API (SQLGetCursorName and SQLSetCursorName respectively). |