我有一个包含 3 列的游戏保存分数的表格(在实践中更多,但这种方式对每个人来说都更容易):
userid : the id of the user that got the score
timestamp: the time the score was gotten
score : the score itself
Run Code Online (Sandbox Code Playgroud)
查询的目标是删除行,因此每个用户最多有 10 个分数。我们还希望保留最近的行。所以我们需要删除旧的,直到我们得到 10。注意有些玩家的分数可能少于 10。
我将如何设法做到这一点?
归档时间: |
|
查看次数: |
9027 次 |
最近记录: |