Example: Dropping a Transaction-Time Column - Analytics Database - Teradata Vantage

Temporal Table Support

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
eud1628112402879.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
fif1472244754791
lifecycle
latest
Product Category
Teradata Vantage™

Dropping any type of column from a transaction-time or bitemporal table requires the NONTEMPORAL privilege on the table, and the NONTEMPORAL qualifier to ALTER TABLE must be used.

Consider the following transaction-time table:

   CREATE MULTISET TABLE Customer (
      Customer_Name VARCHAR(40),
      Customer_ID INTEGER,
      Customer_Address VARCHAR(80),
      Customer_Phone VARCHAR(12),
      Customer_Duration PERIOD(TIMESTAMP(6) WITH TIME ZONE) NOT NULL
         AS TRANSACTIONTIME
      )
   PRIMARY INDEX ( Customer_ID );

Assuming that you have the NONTEMPORAL privilege on the Customer table, the following ALTER TABLE statement drops the Customer_Duration column:

   NONTEMPORAL ALTER TABLE Customer DROP Customer_Duration;

When a transaction-time column is dropped from a transaction-time or bitemporal table, all closed rows (all history rows in the transaction-time dimension) are physically deleted from the table.