ALTER TABLE … UPDATE Statements 

ALTER TABLE [db.]table UPDATE column1 = expr1 [, ...] WHERE filter_expr

Allows to manipulate data matching the specified filtering expression. Implemented as a mutation.

The filter_expr must be of type UInt8. This query updates values of specified columns to the values of corresponding expressions in rows for which the filter_expr takes a non-zero value. Values are casted to the column type using the CAST operator. Updating columns that are used in the calculation of the primary or the partition key is not supported.

One query can contain several commands separated by commas.

The synchronicity of the query processing is defined by the mutations_sync setting. By default, it is asynchronous.

See also

Rating: 3.5 - 2 votes

Was this content helpful?
★★★★☆