- Connect to Teradata Database using SQLA or Studio.
- Execute the following CREATE table statement with an identity column defined:
/* Create Identity table*/CREATE TABLE Idn_EMP_TBL(EMP_ID INTEGER GENERATED ALWAYS AS IDENTITY -- Identity column(START WITH 1INCREMENT BY 1MINVALUE 0MAXVALUE 1000000NO CYCLE),Name VARCHAR(20),Phone VARCHAR(10));
- Let's insert data into the table as follows:
/*Insert data into identity table*/insert into td_cookbook.Idn_EMP_TBL values (1,'Rob',2500); insert into td_cookbook.Idn_EMP_TBL values (2,'Moss',2322);
- Now let's skip the first column value and insert the rows as show in code again:
/*Insert data into identity table*/insert into td_cookbook.Idn_EMP_TBL values (,'Andrew',250); insert ...