PL/SQL block
SET SERVEROUTPUT ON
DECLARE
sumSalary number;
BEGIN
select sum(salary) into sumSalary
from employees
where department_id=&department_id;
dbms_output.put_line('The sum of salary ->'||sumSalary);
END;
/
SET SERVEROUTPUT ON
DECLARE
sumSalary number;
BEGIN
select sum(salary) into sumSalary
from employees
where department_id=&department_id;
dbms_output.put_line('The sum of salary ->'||sumSalary);
END;
/
Output:
No comments:
Post a Comment