===
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
==