UPDATE Statement (ANSI System-Time Table Form) | Teradata Vantage - 17.10 - UPDATE (ANSI System-Time Table Form) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - ANSI Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1186-171K
Language
English (United States)

Modifies column values in existing rows of system-time tables.

Syntax

There is no special additional temporal syntax for the UPDATE statement when used on a system-time table. The syntax is identical to that used for nontemporal tables. That syntax is described fully in Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.

Usage Notes

Although the syntax for a UPDATE statement is identical for system-time and non-temporal tables, the effects are different. When you change a row in a nontemporal table, the original information in the row no longer exists. The situation can be thought of as if the original row had been deleted and replaced with a new row.

System-time tables make this implicit situation explicit, by literally deleting the original row from the table and inserting a new row into the table to reflect the modified information. Because rows are never physically deleted from system-time tables, the original row is closed in system time, and remains inactive in the table as a snapshot of how the table existed before the change.

Updates so not affect closed rows in system-time tables.

The SET clause cannot include the beginning or ending column components of the SYSTEM_TIME derived period column.