SQL Developer如何执行存储过程
create or replace procedure USP_CA_GetAOrHCampaigns
(pi_serialNo in VarChar2,
my_cur out sys_refcursor) is
begin
open my_cur for
select xxx from ...;
end USP_CA_GetAOrHCampaigns;
这是这个存储过程,请问这个存储过程怎么测试一下,现在用的是SQL Developer.
------解决方案-------------------- 引用: Quote: 引用: DECLARE PI_SERIALNO VARCHAR2(200); MY_CUR sys_refcursor; temp vp_campaign%rowtype; BEGIN PI_SERIALNO := '2003004495'; USP_CA_GETAORHCAMPAIGNS( PI_SERIALNO => PI_SERIALNO, MY_CUR => MY_CUR ); --OPEN MY_CUR;已经打开了。。。 LOOP fetch MY_CUR into temp; exit when MY_CUR%notfound; DBMS_OUTPUT.PUT_LINE('MY_CUR = ' ------解决方案-------------------- temp.analystno); END LOOP; END; Error report - ORA-06504: PL/SQL: Return types of Result Set variables or query do not match ORA-06512: at line 14 06504. 00000 - "PL/SQL: Return types of Result Set variables or query do not match" *Cause: Number and/or types of columns in a query does not match declared return type of a result set variable, or declared types of two Result Set variables do not match. *Action: Change the program statement or declaration. Verify what query the variable actually refers to during execution. 请问,这个是什么原因造成的???能不能把你的存储过程贴出来?