我在 oracle sql plus 中创建一个函数,它以 empno 作为参数并返回它的薪水。但它没有被创建,我哪里出错了?
这是我的功能:
CREATE FUNCTION GETEMPSALARY (EMPNUMBER IN INTEGER) RETURN INTEGER
IS
EMPSALARY INTEGER;
BEGIN
SELECT SAL INTO EMPSALARY FROM EMP WHERE EMP.EMPNO = EMPNUMBER;
RETURN EMPSALARY;
END GETEMPSALARY;
这是错误:
Error at line 1: PLS-00103: Encountered the symbol "(" when expecting one of the following:
. @ % ; is authid as cluster order using external character
deterministic parallel_enable pipelined aggregate
result_cache
1. CREATE FUNCTION GETNAMES1 (EMPID IN INTEGER) RETURN VARCHAR(20)
2. IS
3. EMPNAME VARCHAR(50);