delete a 
from 
    [table] a 
where 
    (select count(distinct *) from [table] where num<=a.num)
  !=(select count(*) from [table] where num=a.num and number<=a.number)

解决方案 »

  1.   

    select num,name,money,other,date,min(license) license into #1 from 表 group by num,name,money,other,datetruncate table 表insert 表 select * from #1
      

  2.   

    xueguang(xg) 筛选出来的license不能重复,而且不能露掉,比如,上面的应为
    0204
    0206
    0289
    0290
      

  3.   

    select distinct * into #1 from 表truncate table 表insert 表 select * from #1
      

  4.   

    还是删除不掉重复记录呀,请大家帮我看看吧!
    (最后的要求是num 和license 都不能有重复的,但是都不能被漏掉或者删掉)