...
update retired_emps
set ROW = emp_rec <-- ROW 키워드에 주목
where empno = &emp_no;
...
----------------------
set serveroutput on
select * from e1
where rownum = 1;
declare
emp_rec e1%rowtype;
begin
select * into emp_rec
from e1
where rownum = 1;
emp_rec.comm := 20;
emp_rec.deptno := 10;
update e1
set ROW = emp_rec
where empno = emp_rec.empno;
commit;
end;
/
select * from e1;
'Oracle > PL/SQL' 카테고리의 다른 글
15일차 # 6-20: Using Collection Methods (0) | 2012.04.24 |
---|---|
15일차 # 6-15: PL/SQL Collections (0) | 2012.04.24 |
15일차 # 6-13: Insert with records (0) | 2012.04.24 |
15일차 # 6-9: %ROWTYPE attribute (0) | 2012.04.24 |
15일차 # 6-7: Record type (0) | 2012.04.24 |