User (id, name, surname,cod)
UserNew (uid, uname, usurname, ucod)
The first table has data the second no.
I have to copy the data of the User table in the UserNew table.
I’ve tried with a insert query but uid (primary key) value changes.
How can i do to mantaince the same values?
thanks
I’m guessing that
uidof theUserNewtable is an identity (autoincrement) column. So you could issue aSET IDENTITY_INSERT UserNew ONstatement, then insert the data (including the correct id) and then issue aSET IDENTITY_INSERT UserNew OFF