delete from tablename where fieldname=要删除的;

解决方案 »

  1.   

    一般的办法使用游标删除,在sql中当不包括text,image时可以通过临时表来做.
      

  2.   

    如果纪录不全相同可用自连接或group by...having操作,若完全相同,只有写程序或过程了
      

  3.   

    给你一个方法
    delete tablename from  tablename,(select 重复字段 as iiid max(primary key) as iid tablename group by 重复字段 having count(*)>1) as k where tablename.primary key<k.iid and tablename.重复字段 =k.iiid 
      

  4.   

    如果是oracle/informix可用rowid或rownumber来区别,因为在一张表中rowid,rownumber不会有重复。
      

  5.   

    towwl007(疑难杂症):看不明白?请指教!
      

  6.   

    你有主键字段吗?如果有,试试下面的语句
    delete from 表名 where 主键字段 not in(select min(主键字段) from 表名 group by 重复的字段名 having count(重复的字段名)>1)
      

  7.   

    什么数据库?如果是oracle就简单多了
    delete from table1 a
           where rowid <(select max(rowid) 
                           from table1 b
                          Where 重复字段名 = a.重复字段名)