调用存储过程

来源:互联网 发布:淘宝开网店要不要注册 编辑:程序博客网 时间:2024/05/20 13:14
如果要在其他地方要调用这个存储过程(pkg_resultset.proc_resultset)并遍历结果集(p_page), 你可以用类似于如下的方法即可!

declare
    cur pkg_resultset.each_page;
    arr dept%rowtype;
begin
    pkg_resultset.proc_resultset(cur);
    loop
        fetch cur into arr;
        exit when cur%notfound;
        /*write to codes to process datas*/
    end loop;
    close cur;
end;
0 0
原创粉丝点击