存儲過程如下:
Create procedure gokul_proc(
pId in number,
pName in varchar2,
OutCur OUT G_PKG_REFCUR.rcDataCursor ) is
BEGIN
Open OutCur For
select * from gokul_table ob
where ob.active_staus-'Y' AND ob.id=pId AND ob.name=pNname;
END;
在sqlplus中執行如下:
VAR rc REFCURSOR
EXEC gokul_proc(1,'GOKUL', :rc);
print rc
reference