原创

4A-查询重复用户信息

嵌套查用户方法:(包括以下两种方法)

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
                        

正文到此结束
本文目录