what is identity column in TD?

Answer Posted / surendra reddy duggireddy

Identity Columns generate a system-generated number for
every row as it is inserted
in the table. It is also knows as a DBS Generated Unique
Primary Index. Identity
Columns are used if you want to guarantee row uniqueness in
a table and they can
simplify the initial port from databases other than
Teradata. They are often used as the
Primary Index so they can guarantee even distribution. In
some cases they are utilized to
optimize and simplify the first port from another database
that uses generated keys.
Identity columns do NOT need to be part of the Primary
Index, but they are often used
for that purpose because they provide even data
distribution. The biggest rule is that
you can only specify one Identity Column per table



Example:
-------
Create Table Employee_Table
( Employee_No INTEGER
GENERATED ALWAYS AS IDENTITY
(START WITH 1 INCREMENT BY 5
MAXVALUE 1000000
NO CYCLE)
, Dept_No INTEGER
,First_Name CHAR(20)
,Last_Name CHAR(20)
,Salary DECIMAL (10,2)
) PRIMARY INDEX (Employee_No);

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of teradata?

817


Explain teradata vs. Redshift?

798


What is oltp?

782


What tools would you use for that?

834


What are the main components of teradata system?

847


What is difference between user and database in teradata?

873


why use references rather than pointers in the public api, particularly for arguments which are modified?

787


How do you see a ddl for an existing table?

791


What are the frequently used data types in teradata?

827


What is multi insert?

826


What are the steps to create a data model?

823


What is teradata? Also, list out some of the primary characteristics of teradata.

801


How many sessions of MAX is PE capable of handling at a particular time?

832


Explain the types of join supports by teradata?

797


How to Extract data from multiple legacy systems?

838