I have a table called ComplaintCodes which contains about 15 rows and 2 columns: ComplaintCodeId and ComplaintCodeText.
I want to insert a new row into that table but have its ID set to 1 which will also add 1 to all of the ID’s that exist already. Is this possible?
EDIT
Using SQL Server and ComplaintCodeId is an identity / PK column
Edit:
If its a PK+Identity column, then its a very bad idea to do like this. You cannot update an identity column..
Instead of updating you could do something like this:
and use row_num instead of ComplaintCodeId