Oracle删除重复的数据,Oracle数据去重复
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密码过期如何取消密码180天限制及密码180天过期,账号锁住的问题
这篇文章主要介绍了Oracle密码过期如何取消密码180天限制及密码180天过期,账号锁住的问题,需要的朋友可以参考下2018-12-12
Oracle RMAN还原时set newname文件名有空格报错的解决方法
数据库备份还原是我们日常开发少不了的一个功能,但如果一不注意估计就会有问题,下面这篇文章主要给大家介绍了关于Oracle RMAN还原时set newname文件名有空格报错的解决方法,需要的朋友可以参考借鉴,下面随着小编来一起学习学习吧。2017-11-11


最新评论