Ghadeer Walid
Ghadeer Walid

Reputation: 41

PLS-00103: Encountered the symbol "," when expecting one of the following .... [PL/SQL]

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

Upvotes: 1

Views: 7208

Answers (1)

eaolson
eaolson

Reputation: 15094

My guess is that this has to do with the fact that SUM is an existing function in PL/SQL. Try changing the name of your function to MYSUM or something and see if that fixes it.

Upvotes: 4

Related Questions