create or replace procedure proc_return_deptinfo(p_deptno employees.departmentid%type,
p_avgsal out employees.salary%type,
p_count out number) as
begin
select avg(salary), count(*)
into p_avgsal, p_count
from employees
where departmentid = p_deptno;
exception
when no_data_found then
dbms_output.put_line('then department dot''t exists');
end proc_return_deptinfo;
p_avgsal out employees.salary%type,
p_count out number) as
begin
select avg(salary), count(*)
into p_avgsal, p_count
from employees
where departmentid = p_deptno;
exception
when no_data_found then
dbms_output.put_line('then department dot''t exists');
end proc_return_deptinfo;