create or replace package pack1
is
TYPE emp_rec_tab_type IS TABLE OF emp%rowtype
INDEX BY PLS_INTEGER;
end;
/
create or replace procedure up_emp_sawon_all (
p_emp_all out pack1.emp_rec_tab_type
)
is
begin
select * bulk collect into p_emp_all
from emp;
end;
/
----------
> 활용 1 <
----------
declare
r pack1.emp_rec_tab_type;
begin
up_emp_sawon_all(r);
for i in r.first .. r.last loop
p(r(i).empno||' '||r(i).ename||' '||r(i).job||' '||r(i).sal);
end loop;
end;
/
'Oracle > PL/SQL' 카테고리의 다른 글
15일차 # 문제 (0) | 2012.04.24 |
---|---|
15일차 # 1-13 (0) | 2012.04.24 |
15일차 # 1-10 (0) | 2012.04.24 |
15일차 # 1-6 (0) | 2012.04.24 |
15일차 PL/SQL Program Unit Chapter 1 - Procedures (0) | 2012.04.24 |