17.10 - Example: Inserting Rows into an ANSI System-Time Table - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - ANSI Temporal Table Support

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)
INSERT INTO employee_system_time VALUES 
 (1001,'Sania',111,TIMESTAMP'2002-01-01 00:00:00.000000+00:00',                    TIMESTAMP'2002-07-01 12:00:00.350000+00:00');
INSERT INTO employee_systime VALUES 
 (1001,'Fred',222, TIMESTAMP'2002-07-01 12:00:00.350000+00:00',                    UNTIL_CLOSED);
INSERT INTO employee_systime VALUES (1002,'Ash',333,123,456);
INSERT INTO employee_systime VALUES (1003,'SRK',111,,’nothing');
INSERT INTO employee_systime VALUES(1003,'Alice',222,’Wonder',NULL);
Values for the start and end columns that constitute the system-time period must be provided in the INSERT statement, but they will be automatically replaced by the database. The start time value will be replaced by the value of the TEMPORAL_TIMESTAMP function at the time of the insertion. The end time value will be replaced by the maximum system TIMESTAMP(6) WITH TIME ZONE value, 9999-12-31 23:59:59.999999+00:00.