Revision history [back]

In general, it's better to have the database manage these kind of id columns. Here is an example from StackOverflow of how to define an auto-increment column in Teradata:

SEQ_NUM decimal(10,0) NOT NULL GENERATED ALWAYS AS IDENTITY