I need to change the primary key of a table to an identity column, and there\'s already a number of rows in table.
I\'ve got a script to clean up the IDs to ensure
Consider to use SEQUENCE instead of IDENTITY.
IN sql server 2014 (I don't know about lower versions) you can do this simply, using sequence.
CREATE SEQUENCE sequence_name START WITH here_higher_number_than_max_existed_value_in_column INCREMENT BY 1;
ALTER TABLE table_name ADD CONSTRAINT constraint_name DEFAULT NEXT VALUE FOR sequence_name FOR column_name
From here: Sequence as default value for a column