我在 mySQL 中有一个表,其中记录了在我的网站上完成的最后二十个查询。我想删除第 20 行之后的行。我使用 id 但作为 Auto_Increment..
最佳答案
尝试这样的事情:
delete from <table> where id not in
(select id from <table> order by <datecol> desc limit 20)
关于mysql - 如何在mySQL中删除特定数量的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12004579/