CREATE OR REPLACE
PACKAGE PKG
AS
TYPE RESULT_T
IS
TABLE OF VARCHAR2(3000);
FUNCTION GENERATEF
RETURN RESULT_T ;
END PKG;
/
CREATE OR REPLACE
PACKAGE BODY PKG
AS
FUNCTION GENERATEF
RETURN RESULT_T
IS
i_t RESULT_T := RESULT_T();
BEGIN
FOR TLC IN 1..3
LOOP
i_t.extend;
i_t(i_t.last) := tlc;
END LOOP;
RETURN i_t;
END;
END PKG;
/
当我想执行“ select * from table(pkg.GENERATEF);
”时,系统告诉我有一个“无效的数据类型”。我不确定是什么带来了问题。