以name字段为例
select * from table where name in(select name from table group by name having count(name)>1)