sql 显示重复数据 去重复 distinct

===

sql 显示重复数据

 

select id from A
where id in (select id from A group by id having count(1) >= 2)

—-

select id,count(1) 重复次数 from A group by id having count(1)>1;
查询出来的结果都是id重复的,重复次数 中的数值就是重复了多少次。

==

  sql  去重复  distinct

select distinct name from A

去重复的name

==

    原文作者:韩亚飞_yue31313_韩梦飞沙
    原文地址: https://blog.csdn.net/yue31313/article/details/95608153
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞