Declarative Objectivity (DO) Language : Data Statements : UPDATE Statement
UPDATE Statement
An UPDATE statement modifies specified objects in the federated database.
Syntax 
updateStatement : updateClause whereClause? updateAction+ updateReturn?;
updateClause : UPDATE source;
updateAction : setClause | clearClause | addClause | removeClause;
updateReturn : groupByClause? orderByClause? returnClause;
Quick Look 
Assign 1200 reward points to every customer that does not have any points yet, and return the user identifier of each such customer:
UPDATE Customers WHERE rewardPoints == 0 SET rewardPoints TO 1200 RETURN userId;
Clear the current number of reward points for a particular customer, resetting the number of points to 0:
UPDATE Customers WHERE lastName == 'Mertz' CLEAR rewardPoints;
Add a date to a rental company’s list of high-volume dates, and return the list:
UPDATE RentalCompany ADD 2017-01-31 TO highVolumeDates RETURN highVolumeDates;
Remove a date from a rental company’s list of high-volume dates, and return the list:
UPDATE RentalCompany REMOVE 2017-01-31 FROM highVolumeDates RETURN highVolumeDates;
Update a particular customer’s list of rentals by adding a rental contract with the specified object identifier; then return the updated list of rentals:
UPDATE Customer WHERE lastName == 'Mertz' ADD 3-3-1-8 TO rentals RETURN rentals;
Remove the first rental contract from a particular customer’s list of rentals, and return the identifiers of the remaining rentals in the list:
UPDATE Customer WHERE lastName == 'Mertz' REMOVE rentals[0] FROM rentals RETURN rentals;
Discussion 
An UPDATE statement modifies values of objects specified by the source specifier (a class name). The sequence of source objects normally filtered by a WHERE Clause.
Warning:If an UPDATE statement does not include a WHERE clause, its actions are applied to all objects in the specified source.
The values to be modified, and the way they are modified, are specified by one or more of the following clauses:
SET Clause—assigns a value to a directly or indirectly reachable attribute or collection element.
ADD Clause—adds elements to a directly or indirectly reachable collection.
REMOVE Clause—removes elements from a directly or indirectly reachable collection.
CLEAR Clause—resets specified attributes or collection elements to their default values.
By default, an UPDATE statement returns the values of all direct attributes of the modified objects. You can include a RETURN Clause to select particular return values. To organize the returned results, the RETURN clause can be supplemented with a GROUP BY Clause, an ORDER BY Clause, or both.