Skip to content

Instantly share code, notes, and snippets.

@JubbaSmail
Created December 22, 2014 20:02
Show Gist options
  • Save JubbaSmail/400eba917adbf867c3cd to your computer and use it in GitHub Desktop.
Save JubbaSmail/400eba917adbf867c3cd to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION SUM_SALARY
(
DEP_ID IN NUMBER
) RETURN NUMBER AS
x number;
BEGIN
select sum(salary) into x from employees where department_id = DEP_ID;
return x;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment