Change values in the existing table record.
column_name = expression | NULL
] [, ...]
|Name of the table.
|Name of the column into which a new value will be entered.
|The own value for the appropriate column determined by an expression.
|Name of the table that will be used for obtaining criteria of changing values.
|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 'time' value 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