declare
type emp_rec_type is record
(no emp.empno%type
, name emp.ename%type
, salary emp.sal%type);
v_emp_rec emp_rec_type;
begin
select empno, ename, sal into v_emp_rec
from emp
where empno = 7788;
p('EMPNO : ' || v_emp_rec.no);
p('ENAME : ' || v_emp_rec.name);
p('SALARY: ' || v_emp_rec.salary);
end;
/
'Oracle > PL/SQL' 카테고리의 다른 글
15일차 # 6-13: Insert with records (0) | 2012.04.24 |
---|---|
15일차 # 6-9: %ROWTYPE attribute (0) | 2012.04.24 |
15일차 # 6-3: Composite Data Types (0) | 2012.04.24 |
15일차 # 확인문제 (0) | 2012.04.24 |
15일차 # 5-29: Sequential Control: GOTO and NULL Statements (0) | 2012.04.24 |