PL/SQL (MOSC)

MOSC Banner

delete in chunks or group of records

edited Jul 14, 2011 9:42AM in PL/SQL (MOSC) 8 commentsAnswered
Hello,  we're attempting to delete about 768432 records from a table and would like to delete these records in smaller chunks say 10000 records as an example.  Here is the select statement that contains the logic for the reocrds we'd like to delete:

SQL> select count(*) from krsb_qrtz_job_details where job_name not in (select job_name from krsb_qrtz_triggers) and job_name not in (select job_name from krsb_qrtz_job_listeners);

COUNT(*) R
---------- -
    768432

We're thinking we could use some PL/SQL cursor to delete X number of records at a time but we haven't been able to to come with the correct PL/SQL syntax.  Can we have some guidance (syntax logic) we could use to perform such a delete in chunks/groups? 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center