renumber primary key

前端 未结 6 1003
天命终不由人
天命终不由人 2021-01-12 03:31

How would I reset the primary key counter on a sql table and update each row with a new primary key?

6条回答
  •  北海茫月
    2021-01-12 04:25

    Why would you even bother? The whole point of counter-based "identity" primary keys is that the numbers are arbitrary and meaningless.

提交回复
热议问题