version 11
UPDATE {sql_name | sql_string}
SET sql_name = {arithmetic_expression |NULL}, ..., sql_name = {arithmetic_expression |NULL}
[WHERE search_condition]
Description
The UPDATE command can be used to modify data contained within a table indicated by passing an sql_name or sql_string.
The SET clause is used to assign new values (either an arithmetic_expression or NULL) to the sql_name type argument(s) passed.
The optional WHERE clause is used to specify which data (those meeting the search_condition) are to be updated. If it is not passed, all the data of the table will be assigned the new value(s) passed in the SET clause.
The UPDATE command is supported for both queries and subqueries; however, a positioned UPDATE statement is not supported.
A CASCADE type update is implemented in 4D, but the SET NULL and SET DEFAULT delete rules are not supported.
Example
Here is an example which updates the MOVIES table so that the tickets sold for the movie "Air Force One" is set to 3,500,000:
UPDATE MOVIES SET Tickets_Sold = 3500000 WHERE TITLE = 'Air Force One';
See Also
arithmetic_expression, DELETE, search_condition.