Timestamping | ANSI Temporal Table Support | Teradata Vantage - Timestamping - Advanced SQL Engine - Teradata Database

ANSI Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ngt1556732962433.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1186
lifecycle
previous
Product Category
Teradata Vantageā„¢

An awareness of time is the defining feature of a temporal database. A large part of temporal table handling involves automatic timestamping by the database.

Whenever a row in a system-time table is modified or deleted, or when a row in a valid-time table is modified in a time-bounded fashion, the system automatically timestamps the row and any new rows that are created as a result of the change. These timestamps note the time of the change, and are used to close rows in a system-time tables and modify the PV as appropriate for new rows in valid-time tables.

Timestamping happens at the transaction level, and timestamps are entered automatically by Teradata Database as the value of the TEMPORAL_TIMESTAMP or TEMPORAL_DATE built-in database functions at the time of the change. These resolve to the time or date when the first non-locking reference is made to a temporal table, or when the built-in function is first accessed during the transaction. TEMPORAL_TIMESTAMP and TEMPORAL_DATE remain the same throughout the transaction.

For more information on TEMPORAL_TIMESTAMP built-in function, see Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates, B035-1145.