MySQL数据库查找多个字段值全部相同的记录

 

数据库中用户表,数据从第三方系统导入,由于一些垃圾数据,存在用户名和密码都相同的账户,造成接口上一些问题,SQL语句如下:

select User_Account,User_Pwd,COUNT(User_Account) As Account,COUNT(User_Pwd) As Account2 from base_userinfo group by User_Account,User_Pwd HAVING Account>1 and Account2>1;

 

posted @ 2019-05-08 16:00  一个人的孤独自白  阅读(2734)  评论(0编辑  收藏  举报