delete from pre_common_tag where tagid not in ( select t.min_id from (select min(tagid) as min_id from pre_common_tag group by tagname) as t ); 自己用的,如果不需要,不要乱删。