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;
RETURN SAL * 12 + NVL(PCOMM, 0);改为return psal*12+nvl(pcomm,0);
没写return