1、业务表出现大量重复数据,要进行去重处理(不是指查去重,要直接删除)
(id必须是自增的或有规律的纯数字,这条语句才有效果)
DELETE FROM t_project WHERE id NOT IN (
SELECT t2.id FROM ( SELECT MIN(t.id) AS id FROM t_project t GROUP BY t.project_code ) t2);