我创建了以下功能:
SET SERVEROUTPUT ON
SET ECHO ON
CREATE OR REPLACE FUNCTION count(id integer)
RETURN integer IS
total integer;
BEGIN
SELECT count(*) into total
FROM DEPARTMENTS
where DEPARTMENTS.DEPARTMENT_ID = id;
RETURN total;
END;
/
在执行时创建了该函数,但在声明我遇到以下错误时:
DECLARE
i integer;
BEGIN
i := count(230);
dbms_output.put_line('Total no. of Customers: ' || i);
END;
/
错误:PLS-00204:函数或伪列'计数'可以在
中使用