我用的是PL/SQL Developer开发运行的
存储过程:
create or replace procedure testForCursor(cur out sys_refcursor) is
begin
open cur for
select * from dual;
end;
调用:
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
结果:
/
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
ORA-01008: 并非所有变量都已关联
问题:为什么?
存储过程:
create or replace procedure testForCursor(cur out sys_refcursor) is
begin
open cur for
select * from dual;
end;
调用:
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
结果:
/
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
ORA-01008: 并非所有变量都已关联
问题:为什么?
http://community.csdn.net/Expert/topic/5301/5301481.xml?temp=.5152704
begin
open cur for
select * from dual;
end;
调用:
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
结果:
/
declare
cursor cur1 return dual%rowtype;
begin
-- Call the procedure
testforcursor(cur => :cur1);
end;
ORA-01008: 并非所有变量都已关联
问题:为什么?