有时间字段不? delete tablename where year=2007 or year=2008
就A表中09年的数据拷到另一表B,删除A表,把B表的名字改为A,速度很快的
什么意思 是单独的删除 ????? delete from tb where to_char(dt,'yyyy') in('2007','2008')还是批量删除declare begin while 1=1 loop delete from tb to_char(dt,'yyyy') in('2007','2008') and rwonum<=&n; commit; exit when sql%rowcount=0; end loop; end;
delete tablename where year=2007 or year=2008
begin
while 1=1 loop
delete from tb to_char(dt,'yyyy') in('2007','2008') and rwonum<=&n;
commit;
exit when sql%rowcount=0;
end loop;
end;