Example: Creating a Table with a Derived Period Column - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example creates a table, employee , with a derived period column, jobduration , where jobstart is the period begin column name and jobend is the period end column name.

CREATE TABLE employee (
eid INTEGER NOT NULL,      
name VARCHAR(100) NOT NULL,
deptno INTEGER NOT NULL,
jobstart DATE NOT NULL,
jobend DATE NOT NULL,
PERIOD FOR jobduration(jobstart, jobend) 
) PRIMARY INDEX(eid);