And it is advisable to create an index on the identity column to avoid duplication of values in the identity column.
Don't know how it works on SQL Server, but on DB2 it works as follows :
You allow DB2 to generate the identity column for the first three rows , then you explicity INSERT value 4 and 5 into the column. The next time DB2 inserts the value by default, you'll have another rows with the identity column as 4.
Originally posted by vdesai How do we insert explicit values in identity columns?
In SQL Server this is supported by setting IDENTITY_INSERT property to OFF? Is there something similar in DB2?