我正在尝试从将显示表格内容的过程中返回光标invoice
。包和过程已成功创建,但是当我运行该行时 -Exec CursorPckg.CursorTest_Proc();
我收到以下错误component 'CURSORTEST_PROC' must be declared
任何想法?我正在运行 SQL*PLUS
CREATE or REPLACE PACKAGE CursorPckg
IS
TYPE salary_type IS REF CURSOR RETURN Invoice%ROWTYPE;
END CursorPckg;
CREATE OR REPLACE PACKAGE BODY CursorPckg AS
PROCEDURE CursorTest_Proc (c1 OUT CursorPckg.salary_type)
IS
BEGIN
OPEN c1 FOR
SELECT * FROM Invoice;
END CursorTest_Proc;
END CursorPckg;