删除表中重复的数据,每个重复的只留一条

select * from VirtualAppRight where ID not in 
(select max(t1.ID) from VirtualAppRight t1 group by t1.Name,t1.VirtualAppName);


根据2个字段重复
原文地址:https://www.cnblogs.com/ahghy/p/3614274.html