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

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


根据2个字段重复

 

posted @ 2014-03-20 17:52  山之子  阅读(152)  评论(0编辑  收藏  举报