源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Oracle删除重复的数据,Oracle数据去重复

  • 时间:2020-07-23 11:01 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Oracle删除重复的数据,Oracle数据去重复
[b]Oracle  数据库中查询重复数据:[/b] select * from employee group by emp_name having count (*)>1; [b] Oracle  查询可以删除的重复数据[/b] 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); [b]Oracle 删除重复数据[/b] 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);
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部