ReNumber Auto Increment column in SQL
问题 Heres my problem. I have an autoincrement primary key in sql table lets say table look like this ID | Name| 1 John 2 Jack 3 Bill 4 Joe Then i delete row 2 Jack ID | Name| 1 John 3 Bill 4 Joe And what I want to achieve is to change id column so the table will look like this ID | Name| 1 John 2 Bill 3 Joe Is there a way to do it ? thanks in advance 回答1: I will never do that but you can: create a new autoincrement primary key named ID2 delete ID column rename ID2 column as ID 回答2: Set identity