rt

解决方案 »

  1.   

    select distinct * from 表
      

  2.   

    set rowcount 1
    然后再删除,这样只删除一条记录,
    之后再写
    set rowcount 0恢复过来
    不过这种方法,一次只能删除一个数据,可以写个循环
      

  3.   

    delete qq from (select top 1 * from qq ) as ww where qq.a=ww.a and qq.b=ww.b and qq.c=ww.c and qq.a='1'
    and (select count(*) from qq where qq.a='1')>1你研究一下,也许对你有用
      

  4.   

    既然要删除的话,写入的时候就限制,
    选择到QUERY中删除一条,留一条
      

  5.   

    如果是SQL Server数据库,可以这样
    select distinct * into #temp from yourtablename
    insert yourtablename ( select * from #temp)
    drop table #temp