采用的是下面的方法可删除,假设重复的是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;
时间:2024-3-1 22:31 作者:韩俊 分类: Mysql
采用的是下面的方法可删除,假设重复的是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;
标签: mysql