select distinct * into temp from t
truncate table t
insert into t select * from temp
drop table temp

解决方案 »

  1.   

    alter table 表名 add id int identity(1,1)
    go
    delete  t from 表名 t inner join 表名 as k
    On t.产品名称=k.产品名称 and t.id<k.idalter talbe 表名 drop column id
      

  2.   

    可不可以先select distinct into table1 from table
    把原来的table删除,
    再把table1改成table
      

  3.   

    Frewin(Frewin) 我晕,我不能修改表结构
      

  4.   

    麻烦了点,用一条sql语句应该可以解决
      

  5.   

    select distinct 产品名称,价格,型号 from 表x
      

  6.   

    select distinct *  from t