返回pl sql中的聚合函数

时间:2016-11-04 16:51:13

标签: oracle plsql

如何在pl sql中返回聚合函数?

create or replace procedure get_empsalary(emp_dept varchar(20))
  as
    total_salary number(10,2);
    begin
    select sum(empsalary) 
      into total_salary 
      from employe 
     where empdept=emp_dept;
    dbms_output.put_line('department' || emp_dept || 
                         'salary is ' || total_salary);
 end;

0 个答案:

没有答案