Hi, all
I need to insert some rows into table with commit on every say 100 rows . Can anybody help me with the syntax? Thanx.
Printable View
Hi, all
I need to insert some rows into table with commit on every say 100 rows . Can anybody help me with the syntax? Thanx.
If you are using SQL*Plus, you can issue the command
SET AUTOCOMMIT 100
It is very simpple:
Set up a counter, initialized to zero. Then increase the counter
after the inserting option, and do the commit if the counter value is 100, reset the counter to 0 afterwards. Repeat the loop untill all the records be inserted completedly. Note: p.l. commit finally in order to save the last several records which are not being saved yet.
Alternatively, U can use the mod command, but it will impact the performance a bit.
Tahke care