type test_cursor is ref cursor;
end testpackage;
/
create or replace procedure sp_pro3(spdeptno in number,sp_cursor out testpackage.test_cursor)
is
begin
open sp_cursor for select * from emp where deptno=spdeptno;
end;
/
In [58]: import cx_Oracle as cx
...: conn = cx.connect('scott/123456@MissWang/orcl')
...: cursor = conn.cursor()
...: spdeptno = 10
...: sp_cursor = cursor.var(cx.CURSOR)
...: cursor.callproc('sp_pro3',[spdeptno,sp_cursor])
Out[58]: [10, <cx_Oracle.Cursor on <cx_Oracle.Connection to scott@MissWang/orcl>>]
请问我该如何获取这个游标的具体值啊


雷达卡




京公网安备 11010802022788号







