select * from info
where to_days(time) = to_days(now()) and tel in (select tel from info group by tel having count(tel) > 1);
info 数据库表名
tel 为手机号
方法2:mysql 查询当天所有重复数据
select * from info where to_days(time) = to_days(now()) and id not in (
select t.id from
(select max(id) as id from info group by tel) as t
);
delete from info where to_days(time) = to_days(now()) and id not in (
select t.id from
(select max(id) as id from info group by tel) as t
);
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询