嵌套查用户方法:(包括以下两种方法)
select * from 用户_整合 l where l.newlogname in (
select l.newlogname
from 用户_整合 l where exists (select * from LOGINID_QY q where q.用户ID = l.用户ID)
group by l.newlogname
having count(1) > 1) ;
查询重复用户信息
select l.*
from 用户_整合 l where exists (select * from LOGINID_QY q where q.用户ID = l.用户ID)
查询重复newloginname
select l.newlogname,count(1)
from 用户_整合 l where exists (select * from LOGINID_QY q where q.用户ID = l.用户ID)
group by l.newlogname
having count(1) > 1
亲,沙发正空着,还不快来抢?
我要评论 / 展开表单