怎么一次查询出某一字段相同的全部数据
1、数据库表:

希望查询出来的结果是这样的:

sql语句:
select * from user where name in (select name from user group by name having count(1) > 1);
只不过这种的查询速度很慢。
1、数据库表:

希望查询出来的结果是这样的:

sql语句:
select * from user where name in (select name from user group by name having count(1) > 1);
只不过这种的查询速度很慢。
