sqlѯijֶεֵͬ:
SELECT * FROM table WHERE col in (SELECT col FROM table GROUP BY col HAVING COUNT (col) >1);
˳˵һwherehaving
select * from table
where (ֻܶԷǰԽɸѡ)
group by (ijֶη)
having (ֻܶԷÿԽɸѡþۺϺ)
--ʹgroup byĬϱΪһ
ʵ
ѯظ¼
select * from ݱ WHERE ظ¼ֶ in ( select ظ¼ֶ from ݱ group by ظ¼ֶ having count(ظ¼ֶ)>1)