Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

'commit' in execute immediate...

gene golubJul 24 2009 — edited Jul 24 2009
Hi folks
I am writing a proc which removes a lot of data from different tables.
I am parsing a string into variable like:
declare v_i1 pls_int:=1;
begin
while v_i1 > 0 loop
delete table 1 where .... and rownum<30000;
v_i1:=sql@rowcount;
commit;
end loop;
end;

It's coded for every table and executed. However, execution complains about 'commit' statement. Do I violate a usage of exeucte immediate by including commit in it?
Straight delete statement were causing error message from undo segment being unable to expand. So I try to delete data in a smaller batches.
Are there any alternatives for what i am trying to accomplish?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2009
Added on Jul 24 2009
6 comments
1,228 views