Legacy INSERT Examples | Teradata Vantage - 17.00 - Examples: Legacy INSERT Examples - 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: Legacy INSERT

Following are valid inserts that use the legacy column to value mapping syntax.

INSERT INTO ocean_buoy_no_seq (TD_TIMECODE, BUOYID, TEMPERATURE) VALUES (TIMESTAMP '2017-01-06 10:32:12.123456', 111, 50);
INSERT INTO ocean_buoy_no_seq (BUOYID, TEMPERATURE, TD_TIMECODE) VALUES (111, 50, TIMESTAMP '2017-01-06 10:32:12.123455');
INSERT INTO ocean_buoy_no_seq VALUES (TIMESTAMP '2017-01-06 10:39:10.123456', 111, 66);

Examples: Invalid Legacy INSERT

You cannot specify an isolated loading clause with inserts into a PTI table. This statement returns an error.

INSERT WITH CONCURRENT ISOLATED LOADING INTO ocean_buoy_seq VALUES(TIMESTAMP '2017-01-06 10:32:12.133308', 1, 444, 50);

You cannot specify default values for inserts into a PTI table. This statement returns an error.

INSERT INTO ocean_buoy_no_seq DEFAULT VALUES;

You cannot specify the TD_TIMEBUCKET column in inserts for a PTI table. This statement returns an error.

INSERT INTO ocean_buoy_no_seq (TD_TIMEBUCKET, BUOYID, TEMPERATURE, TD_TIMECODE) VALUES (123, 111, 50, TIMESTAMP '2017-01-06 10:32:12.123456');