I have million records and i want to delete 10000 records each time....how to do that?
I have written the following query for that
loopcount=ceil (1000000/10000)
while (i<loopcount)
{
delete from table where =(every time i need to delete 10000 records)
commit;
i=i+1;
}
I am confused what to write in the where clause so that in every while statement 10000 records are deleted.
I have written the following query for that
loopcount=ceil (1000000/10000)
while (i<loopcount)
{
delete from table where =(every time i need to delete 10000 records)
commit;
i=i+1;
}
I am confused what to write in the where clause so that in every while statement 10000 records are deleted.
Comment