删除重复数据
DELETE t1 FROM invest_year t1, invest_year t2 WHERE t1.pro_id = t2.pro_id AND t1.pro_year = t2.pro_year AND t1.id > t2.id;
自关联,保留id最小的那一条,其它的都删除
DELETE t1 FROM invest_year t1, invest_year t2 WHERE t1.pro_id = t2.pro_id AND t1.pro_year = t2.pro_year AND t1.id > t2.id;
自关联,保留id最小的那一条,其它的都删除