方法一:
select id,name from 表 where name in (select name from 表 group by name having count(*) >=2);
方法二:
select * from (select *,row_number() over(partition by NAME order by NAME)rn from aa) where rn >1;
方法一:
select id,name from 表 where name in (select name from 表 group by name having count(*) >=2);
方法二:
select * from (select *,row_number() over(partition by NAME order by NAME)rn from aa) where rn >1;