采用的是下面的方法可删除,假设重复的是test数据库中的title字段
create table bak as (select * from test group by title having count(*)=1);
insert into bak (select * from test group by title having count(*)>1);
truncate table test;
insert into test select * from bak;
本文来自: sunray's blog
详细参考: http://blog.prcer.com/show-1565-1.html
文章评论
共有 位脚本之家网友发表了评论我来说两句