1.
delete table1
where col1 in (select col1 from table2)
2.
table1 为你导入数据的表
table2 是你insert into  from 后面的表,即重复数据的来源
col1 是能唯一标识你误操作的那些数据的一列
3。然后在insert 一遍就行了。
Insert into table1 
select * from   table2

解决方案 »

  1.   

    不是,我是插入了同一个表,例如
    insert into table1
    (column1,column2)
    select column1,column2 from table1
      

  2.   

    select distinct到另外一个临时表,然后删掉这个再从临时表弄回来。或者用pb的数据管道筛
      

  3.   

    select distinct * into tmptable
    from table
    tmptable就是你要的表,
      

  4.   

    select identity(int,1,1) TID into #temp 
    from table1delete A from #temp A,#temp B
    where A.id=b.id and a.id>b.id
    其中id是table的主鍵要唯一
      

  5.   

    可以这样 ^_^select distinct * into #t from 你的表
    delete 你的表
    insert 你的表
    select * from #t
    drop table #t
      

  6.   

    SELECT  A.EMP_NO,A.EMP_NAM,B.DPT_NO FROM BSEMPMS A (SELET DPT_NO,AVG(SAL) AS AVG_SAL FROM BSEMPMS B GROUP BY DPT_NO) V WHERE A.DPT_NO=V.DPT_NO AND A.SAL>V.AVG_SAL;
      

  7.   

    truncate table
    insert again
      

  8.   

    alter table 表 add id int identity(1,1)
    delete a from 表 a
    where exists(select * from 表  where a.id<id and a.usermobile=usermobile)
    alter table 表 drop column id兄弟用用我的,我刚刚从别人那里修改来的,经过测试的!
      

  9.   

    select top 72000 * into #tmp from table1 
    drop table table1
    select * into table1 from #tmp
    这样可以吗
      

  10.   

    Delete From t_Table Where ID IN 
    (Select ID From t_Table a where 
    (Select Count(*) From t_Table a where a.ID = ID ) > 1 )
    这样可以删除重复记录。