Wednesday, March 7, 2012

Delete with a commit statement

I need to delete about 2 million records in a table in DB2 v7.x, If there a way to code an SQL that would do a commit every 100000 rows, so it would not blow out the transaction logs?
Any help would be appreciated.This is what would do the job for Oracle, i hope it might help you

delete from table
where rownum<100000;
commit;

No comments:

Post a Comment