|
-
I am testing to do a update on emp table .
I added dname column to emp table.
Made emp table to about 500000 rows and trying to do an update so that there is commit for 100 rows ...
Update is happening ...I can select dname .But it is going in a loop .
I have set serveroutput on
but then also 'Commit in progress' is not getting displayed at all
why ???
Declare
cnt number := 0 ;
Cursor loc is
select b.dname dname ,B.deptno deptno
from emp a, dept b
where a.deptno=b.deptno
for update of a.dname ;
Begin
For c1 in loc
loop
update emp set dname = C1.dname
where deptno = C1.deptno ;
cnt := cnt + 1 ;
If cnt = 100 then
cnt := 0 ;
commit ;
dbms_output.put_line ('Commit in progress') ;
end if ;
end loop ;
end ;
/
[Edited by Subha on 02-26-2002 at 02:31 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|