Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: massive delete
>1. Rather than the cursor, you could delete with the help of the rownum
>variable as follows:
> SQL> delete from massive_table where rownum<10001 and ....;
Good idea... I'll have to count how many rows to delete and loop N/10000
times
over "delete from xxxxx where (criterions) and rownum<10001;
>2. If you want to delete all rows in the table use the truncate
>tablestatement:
> SQL> truncate table massive_table;
Yes, but many rows can't be deleted from this table.
One question more, will "truncate " command increase data fragmentation?
thanks for all the replies.
Jorge Received on Thu Sep 23 1999 - 08:41:54 CDT
![]() |
![]() |