0
我有我的存儲過程的幾個問題。如果你能幫助我,那會很好。謝謝!PL/SQL:SQL語句被忽略&ORA - 00984:列不允許在這裏
Create or replace procedure final(Minimum in number)
is
Cursor salary_cursor(Minimum_salary number) is
select first_name || ' ' || last_name employee, department_name, job_title,
min_salary, salary from employees
join departments using (department_id)
join jobs using (job_id)
where Minimum_salary <= min_salary;
begin
for x in salary_cursor(Minimum) loop
insert into finalrept values(n.Employee_name, n.department_name, n.job_title,
n.min_salary, n.salary);
end loop;
Exception
when others then
dbms_output.put_line(SQLERRM || ', ' || SQLCODE);
end final;
/
sho err
我似乎無法弄清楚爲什麼我得到這些錯誤!任何幫助表示讚賞。
刪除'WHEN OTHERS'異常塊時,它隱藏實際的錯誤和行號。作爲一種良好的編碼習慣,它本身被認爲是一個錯誤。參見[當其他人 - 一個bug](https://lalitkumarb.wordpress.com/2014/05/02/when-others-then-null-a-bug/) –
juse替換** n。** s到* * x。** – hmmftg
爲什麼這種緩慢的逐行光標方法?整個過程可以用一個'insert'語句替換。不需要PL/SQL –