mysql 删除表中倒数N条数据(最后几条数据)

180it 2021-09-17 AM 1172℃ 0条

delete from data where exists (select * from (select id from data order by [id] desc limit 0,4) as a where a.id=data.id);

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

mysql 删除表中倒数N条数据(最后几条数据)