UPDATE Statement and Atomic Upsert
Purpose
Teradata TPump supports the UPDATE Teradata SQL statement, which changes field values in existing rows of a table.
Syntax
where
Syntax Element |
Description |
tname |
Table or view to be updated This table was previously identified as tname in the BEGIN LOAD command. If tname is not explicitly qualified by database name, the current default database qualifies it. |
cname |
Column whose value is to be replaced by the value of expr The column named must not be a column of the primary index. |
expr |
Expression whose resulting value is to replace the current value of the identified column The expression can contain any combination of constants, current values of columns of the referenced row, or values from fields of input data records. References to fields of input data records are as follows: :fieldname where :fieldname is defined by a FIELD command or TABLE command of the layout referenced by an IMPORT using this UPDATE. |
WHERE condition |
Conditional clause specifying the row or rows to be updated The conditional clause can use values from fields of input data records by referring to their field names as follows: :fieldname where fieldname is defined by a FIELD command or TABLE command. Equality values for all the columns of the primary index must be explicitly specified in this clause. |
Usage Notes ‑ Update
The following notes describe how to use an UPDATE statement following a DML command. An UPDATE statement may also be used in the support environment; normal rules for UPDATE are followed in that case.