也可以用一下中间表
select id=identity(int,1,1),* 
into #tb
from yourtable
drop table yourtableselect *
into yourtable
from #tb
drop table #tb