function i created:
SQL> create or replace function sum(first number,second number) return number is result number:= 0; begin result:=first+second; return result; end sum;
2 /
Function created.
and here is how i compile it:
set serveroutput on;
begin
dbms_output.put_line(sum(1,1));
end;
/
After compilation, appears the following error:
ERROR at line 2:
ORA-06550: line 2, column 27:
PLS-00103: Encountered the symbol "," when expecting one of the following:
) * & - + / at mod remainder rem <an exponent (**)> ||
multiset
My guess is that this has to do with the fact that
SUMis an existing function in PL/SQL. Try changing the name of your function toMYSUMor something and see if that fixes it.