数据库中用户表,数据从第三方系统导入,由于一些垃圾数据,存在用户名和密码都相同的账户,造成接口上一些问题,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;

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

 

相关文章: