|
-
From another thread - really neat:
Originally posted by jmodic
Code:
LOOP
DELETE with ur condition and
with rownum < (max records u think u can delete);
EXIT WHEN sql%ROWCOUNT = 0;
COMMIT;
END LOOP;
slimdave is right that IN GENERAL using the cursor is not a good method. If "ur condition" produces a FTS, then experience shows that the cursor method is a bit faster (the table is read only once) and commiting inside it does not cause a problem. (You might want to try picking up ROWID in the cursor and using that in the delete statement).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|