Timestamping | ANSI Temporal Table Support | Teradata Vantage - 17.10 - Timestamping - 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)

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 Vantage 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.