Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
create or replace package IT4EVR is
type dept_table is table of s_dept%rowtype;
procedure get_recs (results out dept_table);
end;
/
Package created.
create or replace package body IT4EVR is
procedure get_recs (results out dept_table) is
begin
select * bulk collect into results
from s_dept
order by id;
end;
end;
/
Package body created.
set serveroutput on format wrap
Declare
my_depts it4evr.dept_table;
begin
it4evr.get_recs (my_depts);
for i in 1..my_depts.count loop
dbms_output.put_line(my_depts(i).id||': '
||my_depts(i).name);
end loop;
end;
/
10: Finance
31: Sales
32: Sales
33: Sales
34: Sales
35: Sales
41: Operations
42: Operations
43: Operations
44: Operations
45: Operations
50: Administration
PL/SQL procedure successfully completed.