Oracle删除重复的数据,Oracle数据去重复
2016-08-25 23:43
459 查看
Oracle 数据库中查询重复数据:
select * from employee group by emp_name having count (*)>1;
Oracle 查询可以删除的重复数据
select t1.* from employee t1 where (t1.emp_name) in (SELECT t2.emp_name from employee t2 group by emp_name having count (*)>1) and t1.emp_id not in (select min(t3.emp_id) from employee t3 group by emp_name having count (*)>1);
Oracle 删除重复数据
delete from employee t1 where (t1.emp_name) in (SELECT t2.emp_name from employee t2 group by emp_name having count (*)>1) and t1.emp_id not in (select min(t3.emp_id) from employee t3 group by emp_name having count (*)>1);
您可能感兴趣的文章:
相关文章推荐
- [转]oracle中如何删除重复数据
- 在ORACLE中如何删除表中的重复数据
- 在ORACLE中如何删除表中的重复数据
- Oracle重复数据删除
- oracle中如何删除重复数据
- oracle中如何删除重复数据
- Oracle中如何删除表中重复数据
- 在ORACLE中如何删除表中的重复数据的补充
- ZT: Oracle 中如何删除重复数据
- oracle 删除重复数据
- oracle中如何删除重复数据
- oracle中如何删除重复数据
- 删除oracle中完全重复的数据
- oracle中如何删除重复数据
- oracle中如何删除重复数据(sunlen)
- oracle中如何删除重复数据
- oracle中如何删除重复数据
- oracle中如何删除重复数据
- 删除表中重复的数据(oracle,sql)
- Oracle 删除重复数据之分析函数