select f1,f2 into tmptab from tab group by f1,f2 

解决方案 »

  1.   

    select DISTINCT * from ... where ...
    //    ^^^^^^^^^^
      

  2.   

    Distinct可以将重复的记录不显示
    但是要INTO 到一个新表中去。
      

  3.   

    select field1,field2 into #lsb1 from table group by f1,f2

    SELECT DISTINCT * INTO #LSB1 FROM TABLE 
      

  4.   

    同意hj_cn():
    再加上:
    delete from table
    select * into table from #lsb1
    不过是sql server中,还要注意备份
      

  5.   

    如果是ACCESS数据库:
    select DISTINCT * INTO NewTable [IN externaldatabase] from table [IN externaldatabase] where condition ;
    如果是SQLSERVER数据库:
    则:
    select distinct * into newtable from table where conditioin