Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: TRUNCATE in PL/SQL

Re: TRUNCATE in PL/SQL

From: Steffen Göck <stevie-g_at_gmx.de>
Date: 2000/04/07
Message-ID: <8cl94g$k0t$1@news03.btx.dtag.de>#1/1

perhaps this is the best solution:

loop
  delete from table test

     where rownum < 1000;

  if sql%rowcount = 0
    then exit;
  end if;

end loop;

this way the database has not to drop and allocate extents during 'drop table' or 'truncate table' and overhead and fragmentation would be avoided.

Steffen Göck
www.goeck.com Received on Fri Apr 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US