delete from [t] where [no] not in (select [no] from [t] group by [content])
注:假定no为unique的

解决方案 »

  1.   

    delete T
    from T a
    where T.content = a.content and T.no < a.no
      

  2.   

    delete from [t] where [no] not in (select [no] from [t] group by [content])错误:列 't.no' 在选择列表中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句中。
      

  3.   

    delete T
    from T a
    where T.content = a.content and T.no < a.no
    错误:本身就错了.
      

  4.   

    david4() ?
    no is unique,
    那么select [no] from [t] group by [content]这个可能吗?
    你试试看.
      

  5.   

    delete #T
    from #T,#T a
    where #T.content = a.content and #T.no < a.no
      

  6.   

    一道褒贬不一的 SQL 考试题
    http://dev.csdn.net/develop/article/15/15989.shtm
      

  7.   

    我不知delete 后面的#T是什么意思?
      

  8.   

    delete from t a where exist( select * from t where t.content=a.content and id<a.id)
      

  9.   

    delete from [t] where [no] not in (select min([no]) from [t] group by [content])没测试过!
    其实思路就是,通过group [content],得到content不同的[no],然后把其他的都删了就OK
      

  10.   

    为什么我的MYSQL只能安装在C盘,
    不能安装到其他盘,
    安装到其他盘启动服务的时候会说进程意外终止。
    有类试经历的说说啊!
      

  11.   

    delete t where no in (select distinct a.no from t a, t b where a.content=b.content
    and a.no<b.no)
      

  12.   

    其实这种也可以的:
    delete from t where no > any(select no from t a where t.content = a.content);