我有这张桌子
CREATE TABLE "TB_JOB_LOG"
(
"CODIGO" NUMBER,
"DESCRIPCION" VARCHAR2(200 BYTE),
"FECHA" DATE
)
我有这个存储过程
CREATE OR replace PROCEDURE Dummy_test(
v_mes IN NUMBER DEFAULT NULL,
v_anho IN NUMBER DEFAULT NULL,
cv_1 IN OUT SYS_REFCURSOR)
AS
BEGIN
OPEN cv_1 FOR
SELECT codigo,
fecha
FROM tb_job_log
WHERE codigo > 5
AND codigo < 10;
END dummy_test;
我想用这个其他存储过程从 dummy_test 得到结果
CREATE OR replace PROCEDURE Job_fill_ce
IS
cc SYS_REFCURSOR;
l tb_job_log%ROWTYPE;
BEGIN
Dummy_test(NULL, NULL, cc);
LOOP
FETCH cc INTO l;
exit WHEN cc%NOTFOUND;
dbms_output.Put_line(l.codigo);
END LOOP;
CLOSE cc;
END job_fill_ce;
但是当我执行时出现此错误job_fill_ce
ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
ORA-06512: en "JOB_FILL_CE", line 7
ORA-06512: en line 2
我错过了什么吗?