Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identity columns in Teradata

Status
Not open for further replies.

daewoo

Programmer
Aug 14, 2000
1
0
0
US
Hi all,<br><br>Anyone know how to implement a SQL Server Identity Column( A auto incrementing number) in Teradata?<br><br>Thanks for your time
 
Its better to just do it software side (lock table, get highest number, insert new record with highest number + 1, unlock table).

I don't know if Teradata has autoincrement.
 
Hi,
IDENTITY COLUMN is not the same thing as AUTO INCREMENTING.

There is no ANSI requirement that IDENTITY be Contigous numbers just that they be UNIQUE across the whole table.

So which do you want a UNIQUE IDENTITY COLUMN ( which is implmeneted in v2r6 ) or an AUTO INCREMENT column like....

Insert into table
sel MAX(incr)+1,
value,
value,
value ....
from table;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top