FROM Clause - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

FROM Clause

 

Syntax Element …

Specifies …

FROM

a keyword introducing a table list of the updated table and any other tables from which field values are taken to update the updated table.

When you use an UPDATE syntax that requires a FROM clause, you should specify the names of all outer tables in the clause.

The UPDATE statement FROM clause is a Teradata extension to the ANSI SQL:2011 standard.

table_name_2

the name of one or more base tables, queue tables, derived tables, or views.

table_name_1 must be a member of the table_name_2 table list.

If you do not specify a correlation name for a table_name_2 list object, or if you define a correlation name for it instead of table_name_1, then table_name_2 cannot be a derived table.

If any table_name_2 list member is a view, then that view must be updatable.

If you do not specify a database name, the system assumes the current database.

correlation_name

an alias for a member of the table_name_2 table list.

A correlation name must be specified for at least one of the tables in a self-join operation.

If you specify a correlation name for table_name_1 in the table_name_2 table list using the joined tables syntax, then you must specify that correlation name instead of the true name for table_name_1. See “Example 5: UPDATE Specifying a Correlation Name for the Updated Table in the FROM Clause” on page 486.

Correlation names are also referred to as range variables.