您的位置:首页 > 数据库 > MySQL

WORDPRESS MYSQL删除重复标题文章

2016-01-07 23:18 681 查看
老外博客找来的,很实用,速度很快,执行SQL语句秒删除重复标题文章:

DELETE a.* FROM wp_posts AS a INNER JOIN ( SELECT post_title, MIN( id ) AS min_id FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY post_title HAVING COUNT( * ) > 1 ) AS b ON b.post_title = a.post_title AND b.min_id <> a.id AND a.post_type = 'post' AND a.post_status = 'publish'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: