调用的时候出错,不知道是什么原因,求指教
CREATE OR REPLACE FUNCTION QUERYEMPINCOME(ENO IN NUMBER) RETURN NUMBER AS
PSAL EMP.SAL%TYPE;
PCOMM EMP.COMM%TYPE;
BEGIN
SELECT SAL, COMM INTO PSAL, PCOMM FROM EMP WHERE EMPNO = ENO;
RETURN SAL * 12 + NVL(PCOMM, 0);
END;
CREATE OR REPLACE FUNCTION QUERYEMPINCOME(ENO IN NUMBER) RETURN NUMBER AS
PSAL EMP.SAL%TYPE;
PCOMM EMP.COMM%TYPE;
BEGIN
SELECT SAL, COMM INTO PSAL, PCOMM FROM EMP WHERE EMPNO = ENO;
RETURN SAL * 12 + NVL(PCOMM, 0);
END;
2016-12-05
举报