34,590
社区成员
发帖
与我相关
我的任务
分享
Create table tb(
id int identity(1,1),
name varchar(20)
)
GO
insert into tb
select '2' union all
select '3' union all
select '4'
select id,name,ROW = ROW_NUMBER() over(order by id asc) + 2
from tb
update tb set fid = id + 2