How to do it...

  1. Connect to Teradata Database using SQLA or Studio.

 

  1. 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));
  1. 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);
  1.  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 ...

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.