Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Problem with Create Procedure Syntax
What is wrong with this statement?
create procedure add_comm(emp_id number, new_comm number) as
begin
update emp set comm=comm+new_comm where empno=emp_id;
end add_comm;
I have tried to create this and this is what I get:
SQL> create procedure add_comm(emp_id number, new_comm number) as
2 begin
3 update emp set comm=comm+new_comm where empno=emp_id;
4 end add_comm;
5
6 .
SQL>
I have to use the period to get back to the SQL prompt.
What am I doing wrong. I get no creating the procedure (which I don't think it is creating the procedure) and if I try to use the created procedure I get this:
SQL> execute add_comm(1234,456);
BEGIN add_comm(1234,456); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7: PLS-00201: identifier 'ADD_COMM' must be declared ORA-06550: line 1, column 7:
SQL>
____EFGH_JKLM___QRSTUVWXYZ
![]() |
![]() |