4D v16

UPDATE

Home

 
4D v16
UPDATE

UPDATE  


 

 

UPDATE {sql_name | sql_string}
SET sql_name = {arithmetic_expression |NULL}, ..., sql_name = {arithmetic_expression |NULL}
[WHERE search_condition]

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.

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

 
PROPERTIES 

Product: 4D
Theme: SQL Commands

 
HISTORY 

 
ARTICLE USAGE

4D SQL Reference ( 4D v16)