问个
oracle存储过程要求:编写PL/SQL块,将所有部门名称及其员工个数和平均工资,在屏幕 输出
两张表如下:departments(department_id,department_name)
employee(employee_id,employee_salary,employee_name, department_id)
求问这样的存储过程对么?
create or replace procedure c1
as
begin
select department name, avg(salary),count(employee_id)
from employee,department
where employee.department_id =department.department_id
group by employee.department_id
end;
------解决方案--------------------你自己修改的代码的对的