使用 SELECT 从第 x 位开始查询 MSQL 获胜者
在我的 MySQL 表 Winners
中,我有一个获胜者的列表。
我想做的是选出 10 名获奖者的名单。所以我现在所拥有的是:
SELECT name FROM Winners ORDER BY points DESC LIMIT 10
这将返回前 10 名获奖者,这非常棒。
但是我怎样才能让它(例如)返回 10 个获胜者,但从第 20 位开始呢?现在我能想到的就是取消 LIMIT 并以编程方式选出我想要的 10 名获胜者。但我确信有更简单的方法。
In my MySQL table Winners
, I have a list of people who have won.
What I'd like to do is select a list of the names of 10 winners. So what I have right now is this:
SELECT name FROM Winners ORDER BY points DESC LIMIT 10
This returns the first 10 winners which is great.
But how can I make it (for example) return 10 winners, but starting at 20th place? Right now all I can think of is removing the LIMIT and programatically pulling out the 10 winners I want. But I'm sure there's an easier way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
或者只是
or just