Create or replace function get_empsalary_by dept(emp_dept varchar(20))
return number is
Total_salary number(10,2);
emp_dept varchar(20);
emp_salary number(10,2);
begin
select empdept, sum(empsalary) into emp_dept,emp_salary from employe where empdept=emp_dept;
total_salary :=sum(empsalary);
return total_salary;
end;
/
和錯誤是:如何調試不會在Oracle中構建的存儲過程?
-----------------------------------------------------------------
PLS-00103: Encountered the symbol "DEPT" when expecting one of
the following:
(return compress compiled wrapped
您試圖讀取名爲'employe'或'employee'的表格嗎? –
專業提示:我們喜歡這裏有用的和翔實的標題。 「任何人都可以檢查這些代碼並幫助我」可能適用於網站上的所有12.7M個問題,因此可以做得更具體。這可能是你獲得一些讚譽的地方。 – halfer