34,873
社区成员
发帖
与我相关
我的任务
分享
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