zoukankan      html  css  js  c++  java
  • 处理重复数据

    查找表中多余的重复记录

    select *
      from data_tax_digital_stamps t
     where (t.certificatenm) in (select t.certificatenm
                                   from data_tax_digital_stamps t
                                  group by t.certificatenm
                                 having count(*) > 1);

    删除表中多余的重复记录,只留有rowid最小的记录
    delete from data_tax_digital_stamps t
     where (t.certificatenm) in (select t.certificatenm
                                   from data_tax_digital_stamps t
                                  group by t.certificatenm
                                 having count(*) > 1)
       and rowid not in (select min(rowid)
                           from data_tax_digital_stamps t
                          group by t.certificatenm
                         having count(*) > 1)

  • 相关阅读:
    持续集成概念
    性能测试,负载测试,压力测试有什么区别
    安全测试
    接口测试及常用接口测试工具
    python-Csv 实战
    Python3 + Appium学习链接
    python-Txt实践
    python-ddt实践
    保险--总结
    selenium与页面的交互
  • 原文地址:https://www.cnblogs.com/superJF/p/5806949.html
Copyright © 2011-2022 走看看