Timestamping | ANSI Temporal Table Support | Teradata Vantage - 17.00 - Timestamping - Teradata Database

Teradata Vantageā„¢ - ANSI Temporal Table Support

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-1186-170K

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.