欢迎光临
我们一直在努力

利用sql命令删除标题重复的文章

全部的命令为下

 

create table my_tmp as select min(ID) as col1 from blog_posts group by post_title;

delete from blog_posts where ID not in (select col1 from my_tmp);
drop table my_tmp;
create table my_tmp as select min(ID) as col1 from blog_posts group by post_title;delete from blog_posts where ID not in (select col1 from my_tmp); drop table my_tmp;

 

 

其中  blog_posts    是你的数据库中的那个一般为  wp_posts  的库



微信扫描下方的二维码阅读本文

赞(0)
未经允许不得转载:简单网 » 利用sql命令删除标题重复的文章

相关推荐

  • 暂无文章

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #0

    简单就是快乐-平凡就是幸福-冬嘦慧不忈-慧慧-冬冬-玉慧 » 利用sql命令删除标题重复的文章

    homeshop10年前 (2014-05-07)回复