解决思路:首先写出能够查询出重复数据的SQL
select DISTINCT * from 表名 where busino in (select busino from (select count(busino) as num2,busino from 表名 group by busino having num2>'1') b ) order by busino
然后根据SQL创建并查询出数据添加到临时表中
create table temp as (select DISTINCT * from 表名 where busino in (select busino from (select count(busino) as num2,busino from 表名 group by busino having num2>'1') b ) order by busino
);
删除源表中重复数据
delete from 表名 where busino in (select busino from (select count(busino) as num2,busino from 表名 group by busino having num2>'1') b ) order by busino;
将临时表中的数据查询插入到源表中
insert into 表名 select * from temp;
删除临时表数据
drop table temp;