delete Tabel where
    id not in (
      select id=min(id)
    from Tabel
        group by name,value,valu2
  )

解决方案 »

  1.   

    大侠不行了提示:
    you can't specify target table 'fd_item'  for  update in from clause.thanks
      

  2.   

    mysql 4.1以下:create table tmp select * from yourtable group by name,value,valu2 order by id;
    truncate yourtable;
    insert into yourtable select * from tmp order by id;
    drop table tmp;
      

  3.   

    谢谢了,我用
    select ..,min(id) group by where having count(*)>1
    union
    select .. group by where having count(*)=1到一个表中,再删除解决了.