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

Prior to ANSI/ISO developing a standard for temporal tables, Teradata developed proprietary technology and syntax for a similar, but more sophisticated temporal paradigm.

Teradata valid-time tables qualify as ANSI application-time temporal tables, if they are defined using a valid-time derived period column and have no temporal constraints. These tables are ANSI compliant without modifications.

Teradata “transaction-time” tables are analogous to ANSI “system-versioned system-time” temporal tables, but must be converted to system-versioned system-time tables in order to be used with ANSI-compliant temporal SQL. For sites that have implemented transaction-time tables, three methods to convert transaction-time tables to system-time tables are provided here. Teradata recommends contacting your Teradata representative for help with this process.

Although Teradata’s original temporal SQL that is used to qualify temporal queries and modifications does operate on Teradata’s ANSI temporal tables, it is not ANSI-compliant SQL.

In order to use ANSI temporal tables on systems that used temporal tables prior to Teradata Database 15.0, the session temporal qualifier must be set to ANSIQUALIFIER. This is normally set appropriately by Teradata personnel. ANSIQUALIFIER changes the SQL behavior with respect to default temporal qualifiers such that unqualified queries and modifications of valid-time tables act as nonsequenced.

You can check the session temporal qualifier setting by looking at the Temporal Qualifier field of the output of the HELP SESSION statement. For more information on HELP SESSION, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

For more information on session temporal qualifiers, see SET SESSION in Teradata Vantage™ - Temporal Table Support, B035-1182.