此代码无法编译。我不知道发生了什么。我使用的是Oracle 8i
CREATE OR REPLACE FUNCTION SALMINS
IS RETURN NUMBER
SAL NUMBER(10);
BEGIN
SELECT MIN(SALARIO) INTO SAL FROM EMPLE;
RETURN (SAL);
END;
错误:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1 PLS-00103: Encountered the symbol "IS" when expecting one of the
following:
( return compress compiled wrapped
表格定义:
Name Null? Type
----------------------------------------- -------- ----------------------------
EMP_NO NOT NULL NUMBER(4)
APELLIDO VARCHAR2(10)
OFICIO VARCHAR2(10)
DIR NUMBER(4)
FECHA_ALT DATE
SALARIO NUMBER(10)
COMISION NUMBER(10)
DEPT_NO NUMBER(2)
答案 0 :(得分:2)
CREATE OR REPLACE FUNCTION SALMINS
RETURN NUMBER IS -- and not IS RETURN NUMBER
SAL NUMBER(10);
BEGIN
SELECT MIN(SALARIO) INTO SAL FROM EMPLE;
RETURN (SAL);
END;