方法1:select id,name from person where name in (select DISTINCT name from person group by name having count(*)>1 )
方法2:select name from person group by name having count(name)>1