检查重复记录 -- 检查重复code1 select count(identity) num, identity from event_log where code='code1' order by num desc 删除重复记录 DELETE FROM event_log WHERE `code`='code1' AND identity IN ( SELECT identity from ( ) a ) AND id NOT IN ( SELECT keepId FROM ( ) b ) 其…