I had a column which was IDENTITY(1,1). All rows had been numbered consecutively. I did not add or remove any rows. I removed the identity property on this column. Now, I want it back. I think i can reset it to identity with seed = biggest number in existing table.
Could any problems arise if I do this ?
From MSDN SQL Server forum - You have 2 options:
*But take special care when these columns have any constraints / relations
As stated in MSDN documentation about considerations for preserving data during deployment and schema Updates:
Changes to properties of an identity column on a table, such as the identity seed - "Requires data motion" and it can, in some cases, cause data loss during its execution of the synchronization.
The recommendation in this case: "If the deployment or update script contains these types of changes, you might want to modify it manually to preserve the data"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With