1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
declare
cursor c is select ename, dname from scott.emp e, scott.dept d where e.deptno = d.deptno for update of e.ename;
l_ename scott.emp.ename%type;
l_dname scott.dept.dname%type;
begin
open c;
fetch c into l_ename, l_dname;
update scott.emp set ename = l_ename where current of c;
dbms_output.put_line('EMP -> '||To_Char(sql%rowcount));
update scott.dept set dname = l_dname where current of c;
dbms_output.put_line('DEPT -> '||To_Char(sql%rowcount));
rollback;
end;
/
EMP -> 1
declare
*
ERREUR Ó la ligne 1 :
ORA-01410: ROWID non valide
ORA-06512: Ó ligne 10 |
Partager