I have quick question for you SQL gurus. I have existing tables without primary key column and Identity is not set. Now I am trying to modify those tables by making existing integer column as primary key and adding identity values for that column. My question is should I first copy all the records from the table to a temp table before making those changes . Do I loose all the previous records if I ran the T-SQL commnad to make primary key and add identity column on those tables. What are the approaches should I take such as
1) Create temp table to copy all the records from the table to be modified 2) Load all the records to the temptable 3) Make changes on the table schema 4) Finally load the records from the temp table to the original table.
Or
there are better ways that this? I really appreciate your help
Thanks