This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||
|
4D v20
UPDATE
|
UPDATE {sql_name | sql_string} |
||
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.
Note: This command does not support 4D fields of the Object type.
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.
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';
Product: 4D
Theme: SQL Commands
4D SQL Reference ( 4D v20)