1、 查询某个字段有重复记录的记录
如:查询设备表terminal中phone字段有重复记录的sql
select phone from terminal group by phone having count(0)>1;
2、显示出重复信息的记录
select * from terminal where phone in( select phone from terminal where 1 group by phone having count(0)>1);
1、 查询某个字段有重复记录的记录
如:查询设备表terminal中phone字段有重复记录的sql
select phone from terminal group by phone having count(0)>1;
2、显示出重复信息的记录
select * from terminal where phone in( select phone from terminal where 1 group by phone having count(0)>1);