create or replace procedure getemps( p_cursor in out types.cursorType )
as begin open p_cursor for select * from PROVINCE_MASTER;
end; 这个存储过程怎么执行?Oracle存储过程中执行查询,如何返回数据集,这样的存储过程该怎么写呢,请高手指教
as begin open p_cursor for select * from PROVINCE_MASTER;
end; 这个存储过程怎么执行?Oracle存储过程中执行查询,如何返回数据集,这样的存储过程该怎么写呢,请高手指教
begin
getemps(cc);
end;
is
begin
open out_cursor for
select t.* from emp t;
end;
直接用oracle自带的SYS_REFCURSOR游标定义和在包类定义游标类型这两种方法有区别吗?还是在编程时的一种习惯?
除了使用test跟踪外
使用
declare
cc sys_refcursor;
begin
test_cursor(cc);
end;
如何能看到返回的结果集
在 sqlplus 里执行var ocursor refcursor;
call test_cursor(:ocursor);
print ocursor;
call test_cursor(:ocursor);
print ocursor;
这几行代码在oracle客户端执行报错啊。。