sun-rain

删除表中重复记录,只保留一条:

delete from 表名 where 字段ID in (select * from (select max(字段ID) from 表名 group by 重复的字段 having count(重复的字段) > 1) as b);


查询重复数据
select * from prpmlossitem where CaseNo in (
select CaseNo from prpmlossitem
group by CaseNo
having count(CaseNo) > 1
)

分类:

技术点:

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-06-06
  • 2021-08-17
  • 2022-01-03
  • 2021-11-25
猜你喜欢
  • 2021-11-23
  • 2021-04-18
  • 2022-12-23
  • 2021-08-04
  • 2021-12-11
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案