First one alters the column to be a primary key, the second one adds a new column with identity set and constraints it as primary key. How can you merge both? In one case the column exist and another the column is added, both the scripts use same column name - ID. Doest it not contradict to what you are trying to do?
Moreover, You can't use ALTER TABLE to modify a column to be identity. It can be done only when adding the column, AFAIK
So you got to follow the second script. The right things is to, create a new table with identity/primarykey column of similar structure and do an insert into and copy all the rows from old table to the new one.
- Vijay G
Strive for Perfection