Change values in the existing table record.
column_name = expression | NULL
] [, ...]
|table_name ||Name of the table.|
|column_name ||Name of the column into which a new value will be entered.|
|expression ||The own value for the appropriate column determined by an expression.|
|table_source ||Name of the table that will be used for getting criteria of changing values.|
|search_condition ||Logical expression that determines which rows of the table are being changed (if WHERE is not stated, then it means all records).|
Change the value of the column 'flags' for all records to the value 1.
UPDATE data SET flags=1
Change the value of the column 'flags' for the record that is specified by the precise time to the value 2.
UPDATE data SET flags=2 WHERE time='2003-07-02 10:02:00.227'
Change the value of the column 'flags' for the first record that meets the criterion that the value 'time' is greater than the specified time.
UPDATE data SET flags=3 FROM (SELECT TOP 1 * FROM data ORDER BY time) AS d1 WHERE data.time=d1.time