删除表中重复数据
delete from  t_major
where
speciality in (select speciality from (select speciality from t_major group by speciality having count(speciality) > 1) a)
and
id not in (select pid from (select min(id) as pid from t_major group by speciality having count(speciality) > 1 ) b)
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号