用一下Group by
select min(field1),min(field2),...  from  Table where xxxx group by field1,field2如果只有一条数据的话,min就是他自己,如果有重复,min也是自己,但是只会出现一次

解决方案 »

  1.   

    你把你 要的 数据 找出来
    select distinct 字段名,, into New表 from 表
    删掉旧表
      

  2.   

    select distinct * into #t1 from yourtable
    truncate table yourtable
    insert into yourtable select * from #t1
    drop table #t1
      

  3.   

    几个字段重复?
    一个的话用
    select distinct * into #t1 from yourtable
    truncate table yourtable
    insert into yourtable select * from #t1
    drop table #t1
    多个的话用select min(field1),min(field2),...  into temp1 from  Table1 where xxxx group by field1,field2
      

  4.   

    刚看到别人(zjcxc)写的,给你参考一下
    alter table 你的表 add id int identity(1,1)
    godelete 你的表
    from 你的表 a left join(
      select id=min(id) from 你的表 group by NUM,BOOKNAME,PRICE
    )b on a.id=b.id
    where b.id is null
    goalter table 你的表 drop column id