56,678
社区成员
发帖
与我相关
我的任务
分享
select *
from test as a
where 1<(select count(*) from test where field_id=a.field_id and value=a.value);
select a.*
from test as a inner join
(select field_id,value
from test
group by field_id,value
having count(*)>1 )as b
on a.field_id=b.field_id and a.value=b.value;
select *
from test a
where 1<(select count(*) from test where field_id=a.field_id and value=a.value);
select a.*
from test a inner join
(select field_id,value
from test
group by field_id,value
having count(*)>1 ) b
on a.field_id=b.field_id and a.value=b.value