mysql/oracle多字段去重方法

来源:互联网 发布:下拉刷新js 编辑:程序博客网 时间:2024/05/24 01:07

1、Oracle-没尝试过

delete from table where rowid not in (selelct max(rowid) from table group by id,a);

2、mysql-创建临时表,不适合大数据量的表去重

create temporary table tmp_backup as select * from backup_file_item group by userid,module,mobilename,type having count(1) > 1;truncate table backup_file_item;insert into backup_file_item select * from tmp_backup;drop table tmp_backup;


原创粉丝点击