Getting ready

You need to connect to the Teradata database. Let's create a table and insert data into it using the following DDL. This will be a non-partitioned table, as follows: 

/*NON PPI TABLE DDL*/CREATE volatile TABLE EMP_SAL_NONPPI
(
id INT,
Sal INT,
dob DATE,
o_total INT
) primary index( id)
on commit preserve rows;

INSERT into EMP_SAL_NONPPI VALUES (1001,2500,'2017-09-01',890);
INSERT into EMP_SAL_NONPPI VALUES (1002,5500,'2017-09-10',890);
INSERT into EMP_SAL_NONPPI VALUES (1003,500,'2017-09-02',890);
INSERT into EMP_SAL_NONPPI VALUES (1004,54500,'2017-09-05',890);
INSERT into EMP_SAL_NONPPI VALUES (1005,900,'2017-09-23',890);
INSERT into EMP_SAL_NONPPI VALUES (1006,8900,'2017-08-03',890);
INSERT into EMP_SAL_NONPPI VALUES (1007 ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.