Use the update command to change single rows, groups of rows, or all rows in a table. As in all data modification statements, you can change the data in only one table at a time.
update specifies the row or rows you want changed and the new data. The new data can be a constant or an expression that you specify or data pulled from other tables.
If an update statement violates an integrity constraint, the update does not take place and an error message is generated. The update is canceled, for example, if it affects the table’s IDENTITY column, or if one of the values being added is the wrong datatype, or if it violates a rule that has been defined for one of the columns or datatypes involved.
Adaptive Server does not prevent you from issuing an update command that updates a single row more than once. However, because of the way that update is processed, updates from a single statement do not accumulate. That is, if an update statement modifies the same row twice, the second update is not based on the new values from the first update but on the original values. The results are unpredictable, since they depend on the order of processing.
See Chapter 12, “Views: Limiting Access to Data,” for restrictions on updating views.
The update command is logged. If you are changing large blocks of text, unitext, or image data, try using the writetext command, which is not logged. Also, you are limited to approximately 125K per update statement. See the discussion of writetext in “Changing text, unitext, and image data”.
See the Reference Manual: Commands.