Timestamping - Teradata Database

SQL External Routine Programming

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

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 SQL Functions, Operators, Expressions, and Predicates.