-ShiL

oracle 中测试成功

--找出表中的重复数据 select * from vav_groupbrand_casn where ccasn in ( select ccasn   from vav_groupbrand_casn group by ccasn  having count(*)>1  ) order by ccasn

--找出表中的重复数据 select * from vav_groupbrand_casn  a, vav_groupbrand_casn b where  a.cgroupbranid =b.cgroupbranid and a.ccasn=b.ccasn and a.ccreatedate>b.ccreatedate

--删除重复数据 delete from vav_groupbrand_casn a where rowid !=( select max(rowid)   from  vav_groupbrand_casn b  where a.cgroupbranid = b.cgroupbranid    and a.ccasn = b.ccasn    and a.ccreatedate > b.ccreatedate);

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-09-18
  • 2022-12-23
  • 2021-11-29
  • 2021-07-20
  • 2021-11-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-01
  • 2021-08-17
  • 2021-10-02
  • 2022-12-23
  • 2021-06-07
相关资源
相似解决方案