UPDATE Syntax | SQL Statements | Teradata Vantage - 17.05 - UPDATE Syntax (Basic Form, No FROM Clause) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
{ UPDATE | UPD }
  [ with_isolated_loading ]
  table_name
  [ [AS] correlation_name ]
  SET set_spec [,...]
  [ WHERE condition | ALL ] [;]

Syntax Elements

with_isolated_loading
WITH [NO] [CONCURRENT] ISOLATED LOADING
table_name
Name of the base table, queue table, or derived table to be updated, or the name of a view through which the table is accessed.
correlation_name
An alias for table_name.
set_spec
column_name [.mutator_method_name] = expression
Names of one or more columns whose data is to be updated, and the expressions that are used for update.
If you are updating a UDT column, then you must use the mutator SET clause syntax. See Updating Structured UDTs Using a Mutator SET Clause.
WHERE
A conditional clause. For more information see WHERE Clause.
You can only specify a scalar UDF for search_condition if it is invoked within an expression and returns a value expression.
If you specify a WHERE clause, you must have SELECT access on the searched objects.
condition
Conditional expression to be used for determining rows whose values are to be updated. The condition can reference multiple tables or specify a scalar subquery. See Scalar Subqueries and Rules for Using Scalar Subqueries in UPDATE Requests.
ALL
Indicates that all rows in the specified table are to be updated.
The ALL option is a Teradata extension to ANSI SQL.
WITH [NO] ISOLATED LOADING
Without NO, the UPDATE can be performed as a concurrent load isolated operation.
With NO, the UPDATE is not performed as a concurrent load isolated operation.
CONCURRENT
Optional keyword that you can include for readability.
column_name
Name of a column whose value is to be set to the value of the specified expression.
The column_name field is for a column name only.
Do not use fully-qualified column name forms such as databasename.tablename.columnname or tablename.columnname.
You cannot specify a derived period column name.
mutator_method_name
Name of a mutator method that is to perform some update operation on column_name.
A mutator method name is the same name as the attribute name that it modifies. Within the mutated set clause, parentheses following the attribute name are not valid.
To update a structured UDT column, you must use the mutator SET clause syntax. See Updating Structured UDTs Using a Mutator SET Clause.
expression
An expression that produces the value for which column_name is to be updated.
expression can include constants, nulls (specified by the reserved word NULL), a DEFAULT function, or an arithmetic expression for calculating the new value. Values in a targeted row before the update can be referenced in an expression.
You can specify a scalar UDF for expression if it returns a value expression.
For join updates, you can reference columns in expression from rows participating in the join.
When host variables are used in the SET clause, they must always be preceded by a COLON character.