34,838
社区成员




alter table tablename add columnname int identity(1,1)/2000/2005
select row_number() over(order by database_id) as id /2005
select 自增字段=identity(int,1,1),* into # from 表名
select * from #
select 自增字段=(select count(1) from 表名 where id<=a.id),* from 表名 a