I have problem figuring out how to make an update of many columns using bulk update statement (if possible). I know how to make it using merge or correleated update, I just want to know how to write it using bulk capabilities in pl/sql. Here is the code for sample tables:
create table emp_tmp as select empno, job, sal, comm from emp where deptno = 30;
update emp_tmp set sal=1000, comm=200, job='CLERK';
commit;
Now I would like to update original emp table with job, sal, comm taken from emp_tmp table for some empnos. So I write:
declare
cursor c is ( select e.empno, t.job, t.sal, t.comm
from emp e, emp_tmp t
where e.empno = t.empno
and e.empno > 7700 );
begin
-- ... here I would like to use bulk feature for update statement on emp
end;
I can't figure out the syntax for above idea using bulk statements. Could you give me some hints about it? How it should be written?
Thanks