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遍历全部数据集
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
sql server 遍历 sql遍历数据
步骤:1:先定义一个临时表,把需要用的数据放入临时表中,如果数据不连续,则在临时表中定义一个自增长键
sql server 遍历 字段 sed Time -
sql server 遍历数据 sql遍历字段
在sql或者存储过程中会需要遍历字符串。
sql server 遍历数据 sql 字符串 存储过程