UPDATE

statementsupportedQueries & DML

docs.snowflake.com ↗

Updates specified rows in the target table with new values.

Syntax

supportedpartialnot supportednot scored

UPDATE <target_table>
       SET <col_name> = <value> [ , <col_name> = <value> , ... ]
        [ FROM <additional_tables> ]
        [ WHERE <condition> ]

Parameters

NameRequiredDescription
target_tablerequiredSpecifies the table to update.
col_namerequiredSpecifies the name of a column in target_table. Do not include the table name. For example, UPDATE t1 SET t1.col = 1 is invalid.
valuerequiredSpecifies the new value to set in col_name.
FROM additional_tablesoptionalSpecifies one or more tables to use for selecting rows to update or for setting new values. Note that repeating the target table results in a self-join.
WHERE conditionoptionalExpression that specifies the rows in the target table to update. Default: No value (all rows of the target table are updated)

Usage notes

Referenced by