Insert Data into a Sequenced Table Examples | Teradata Vantage - 17.00 - Examples: Inserting Data into a Sequenced Table - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

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

Examples: INSERT into a Sequenced Table

Following are 5 valid inserts into the table.

INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 1, 111, 50);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 2, 111, 60);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:34:09', 1, 111, 70);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 1, 222, 80);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 2, 222, 90);

Examples: Invalid INSERT into a Sequenced Table

The following statement returns an error because the insert TD_TIMECODE value precedes the timezero DATE '2016-01-01' in the definition of the table ocean_buoy_seq.

INSERT INTO ocean_buoy_seq(TIMESTAMP '2015-01-01 10:32:12', 1, 111, 60);
This statement returns an error because the TD_SEQNO column value is missing:
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12.133308', , 444, 50);