UPDATE#
Примечание
Ниже приведена оригинальная документация Trino. Скоро мы ее переведем на русский язык и дополним полезными примерами.
Синтаксис#
Описание#
Update selected columns values in existing rows in a table.
The columns named in the column = expression
assignments will be updated
for all rows that match the WHERE
condition. The values of all column update
expressions for a matching row are evaluated before any column value is changed.
When the type of the expression and the type of the column differ, the usual implicit
CASTs, such as widening numeric fields, are applied to the UPDATE
expression values.
Примеры#
Update the status of all purchases that haven’t been assigned a ship date:
Update the account manager and account assign date for all customers:
Update the manager to be the name of the employee who matches the manager ID:
Limitations#
Some connectors have limited or no support for UPDATE
.
See connector documentation for more details.