如何用sql删除表中完全相同的两条纪录中的一条纪录

解决方案 »

  1.   

    如何用sql删除表中完全相同的两条纪录中的一条纪录(sqlserver2000)
      

  2.   

    http://www.csdn.net/expert/topic/404/404830.shtm
    除了删除再添加还没发现更好的办法
      

  3.   

    select Distinct * into table1 from table
    delete from table
    update 
    set table.*=table1.*
    from table1
    drop table1
      

  4.   

    http://www.csdn.net/Expert/topic/431/431723.shtm
    欢迎来讨论
      

  5.   

    select * into TempTable from yourtable where 1=2
    insert into TempTable select distinct * from yourtable
    truncate table yourtable
    insert into yourtable select * from Temptable
    drop table Temptable
      

  6.   

    不对不对
    上边UPDATE应改为
    INSERT TO TABLE FROM TABLE1
      

  7.   

    acjin的对,提醒我INSERT用法:
    INSERT x SELECT INTO Y 
    语句忽略表 Y,并且将 SELECT 结果插入表 X 中,
    如下所示: 
    INSERT X
    SELECT select_list INTO Y
      

  8.   

    select distinct * from table1 into #temp
    drop table table1
    select * into table1 from #temp
    drop table #temp  
      

  9.   

    Delete From table1 a Where a.rowid != (Select max(rowid) from table1 b where a.col1 = b.col1 and a.col2 = b.col2 and ...);