When a table is being created or when a column is being added to an existing table, you can define it as identity: myNewIdentityCol int identity(1,1) --see books onlineWhen rows are inserted to the table, Sql Server maintains and increments the value. Here is a quick example:create table #myTable (rowid int identity(1,1), myValue int)insert #myTable (myValue) values (100)insert #myTable (myValue) values (100)insert #myTable (myValue) values (100)select * from #myTabledrop table #myTableoutput:rowid myValue ----------- ----------- 1 1002 1003 100
What are you using to "load" your data?Be One with the OptimizerTG