1、定入包
create or replace package cursorPkg as
type cursorType is ref cursor ;
end ;
2、定入存储过程,OUT类型为cursorType
CREATE or replace PROCEDURE ReturnCursor
( tabname varchar2,thecursor OUT cursorPkg.cursorType ) as
begin
open thecursor for
SELECT * FROM tabname;
end;
/
3、在外部使用此游标
create or replace package cursorPkg as
type cursorType is ref cursor ;
end ;
2、定入存储过程,OUT类型为cursorType
CREATE or replace PROCEDURE ReturnCursor
( tabname varchar2,thecursor OUT cursorPkg.cursorType ) as
begin
open thecursor for
SELECT * FROM tabname;
end;
/
3、在外部使用此游标
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货