select * from user t where t.name in (select name from user group by name on having count(name) > 1)
user 表 ,然后查询name字段重复的记录