• No, just this table, it's not to make it relational, my requirements are simple I have a table that is relational to other tables but based on an already existing uniqueid field.

    I happen to now need a field that auto increments which is simple to setup up if you have no data in a table, had I know my current requirements when the system was built I would have done this.

    However, the table now has 1,000,000 rows in it and I can't just set a field to auto increment without first updating the existing rows with a number so the code I referenced worked perfectly for me. I’m sure there is other people out there that could benefit.

    Thanks

    alter table yourtable

    add autonumber int identity(1,1)

    go