先找出没有重复的userid,然后过滤这些userid,其余的就是有重复的了
select distinct biao.idfrom biao
left outer join (select col1, col2
from biao
group by col1, col2
having count(*) >1) tmp
on biao.col1 = tmp.col1
and biao.col2 = tmp.col2
欢迎分享,转载请注明来源:内存溢出
先找出没有重复的userid,然后过滤这些userid,其余的就是有重复的了
select distinct biao.idfrom biao
left outer join (select col1, col2
from biao
group by col1, col2
having count(*) >1) tmp
on biao.col1 = tmp.col1
and biao.col2 = tmp.col2
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)