本文编写于 1290 天前,最后修改于 1290 天前,其中某些信息可能已经过时。
根據單列刪除且保留ID最小的一條
delete from `pictures` where `内容` in(select `内容` from (select `内容` from `pictures` group by `内容` having count(`内容`) > 1) a) and id not in(select * from (select min(id) from `pictures` group by `内容` having count(`内容`) > 1) b)
參考文章:https://blog.csdn.net/n950814abc/article/details/82284838