首页 > 数据库 > Oracle > Oracle数据库删除表中重复记录的方法
1、
delete from tb_channel a where a.rowid in
(select max(b.rowid) from tb_channle b
where a.policyno=b.policyno and a.classcode=b.classcode);
2、
建立临时表、清空原表、插回原表,如下:
create table temp_emp as (select distinct * from employee) ;
truncate table employee;
insert into employee select * from temp_emp;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7877400/viewspace-1117426/ ,如需转载,请注明出处,否则将追究法律责任。