一条一条的读最好用游标了。
也可以
Select identity(int,1,1) as id ,* into #tmp from tbl_user
然后
declare @i int set @i = 0
while @i < (select count(*) from #tmp) -- or while @@rowcount > 0
begin
set @i = @i + 1
Select * from #tmp where id = @i
end
也可以
Select identity(int,1,1) as id ,* into #tmp from tbl_user
然后
declare @i int set @i = 0
while @i < (select count(*) from #tmp) -- or while @@rowcount > 0
begin
set @i = @i + 1
Select * from #tmp where id = @i
end
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货