PLSQL procedure execution error invalid statement

房东的猫 提交于 2019-12-24 10:06:06

问题


I'm following a tutorial on PL/SQL http://www.plsqltutorial.com/plsql-procedure/. I have created procedure with the following code on apex:

CREATE OR REPLACE PROCEDURE adjust_salary(
    in_employee_id IN EMPLOYEES.EMPLOYEE_ID%TYPE,
    in_percent IN NUMBER
) IS
BEGIN
    UPDATE EMPLOYEES
    SET salary = salary + salary * in_percent / 100
    WHERE employee_id = in_employee_id;
END;

However when I try to run

exec adjust_salary(200,5);

I got error

ORA-00900: invalid SQL statement.  

What is the problem and how to fix it?


回答1:


I see nothing wrong with your PL/SQL. You should check to see if the Procedural Option is installed:

http://www.techonthenet.com/oracle/errors/ora00900.php



来源:https://stackoverflow.com/questions/8871447/plsql-procedure-execution-error-invalid-statement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!