--创建包
create or replace package types as
type cursorType is ref cursor;
end;
--创建存储过程
create or replace procedure Pro_Test( p_cursor in out types.cursorType ) as
begin
open p_cursor for select * from tableName;
end;
--创建函数(也可以使用函数)
create or replace function FunTest return types.cursortype as
l_cursor types.cursorType;
begin
open l_cursor for select * from TableName;
return l_cursor;
end;
Oracle 中使用游标返回结果集
最新推荐文章于 2021-04-12 01:09:16 发布