这个SQL语句会自行判断 (文章标题是否有重复的),如果有会自行删除
比如有【三个X文章】最终只会保留【一个X文章】
CREATE TABLE my_tmp AS SELECT MIN(ID) AS col1 FROM wp_posts GROUP BY post_title; DELETE FROM wp_posts WHERE ID NOT IN (SELECT col1 FROM my_tmp); DROP TABLE my_tmp;
操作步骤【注意事项】操作此步骤前,请先备份数据库!避免操作过程中出现错误
进入数据库操作面板
以宝塔为例
粘贴进去,点击【执行】即可
![](https://www.moyouwang.net/wp-content/uploads/2022/05/1651936792-7e7301a109c1143.png)
原文链接:https://c.larjie.com/repetitive-content-article/,转载请注明出处。