1

我创建的功能:

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.

这是我编译它的方法:

set serveroutput on;
begin
dbms_output.put_line(sum(1,1));
end;
/

编译后出现如下错误:

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
4

1 回答 1

4

我的猜测是,这与SUMPL/SQL 中的现有函数有关。尝试将您的函数名称更改为MYSUM或其他内容,看看是否可以修复它。

于 2012-05-16T00:57:42.687 回答