MySQL查询重复数据

查看哪些字段重复和重复几次

select dwmc,count(*) as c from table_dw group by dwmc having c>1

 

显示重复字段的所有信息

select *from table_dw where dwmc in
(select dwmc from table_dw group by dwmc having count(dwmc)>1)

  

posted @ 2022-05-11 15:11  紫花地丁year  阅读(659)  评论(0编辑  收藏  举报