去除数据库的重复数据
时间:2021-07-01 10:21:17
帮助过:21人阅读
ptop_investrecord
set delflag
= 1 where id
in (
SELECT o.id
from (
SELECT uid,
min(id)
as id,
count(uid)
as num
from ptop_investrecord
where cid
= 1578 and progress
= 1 and comefrom
= ‘5‘ AND delflag
= 0 GROUP BY uid,flagname,
money HAVING num
>1)
as o);
只对老的数据进行更改
去除数据库的重复数据
标签:gre group 重复数 date str body div update min