也可以用一下中间表
select id=identity(int,1,1),*
into #tb
from yourtable
drop table yourtableselect *
into yourtable
from #tb
drop table #tb
select id=identity(int,1,1),*
into #tb
from yourtable
drop table yourtableselect *
into yourtable
from #tb
drop table #tb
dbcc checkident(你的表名, reseed, 0)
其中reseed是指定应该更正当前标识值,也可以是NORESEED指定不应更正当前标识值
0是在标识列中重新赋值时要使用的值,你也可以写1等