当前位置:Gxlcms > 数据库问题 > sql遍历所有数据集

sql遍历所有数据集

时间:2021-07-01 10:21:17 帮助过:4人阅读

DECLARE @a int
set @a = 1
while @a < 5
BEGIN
select top(1) * from QPShuGameMatchDB..MatchScoreStatistics
where UserID in 
(
select top (@a) UserID from QPShuGameMatchDB..MatchScoreStatistics order by Score desc 
)
order by Score;
set @a = @a + 1
END

sql遍历所有数据集

标签:

人气教程排行