如何使用oracle存储过程查询某张表的所有信息

2025-03-22 19:32:58
推荐回答(1个)
回答1:

先定义一个系统游标(sys_refcursor),然后将返回的记录集放到这个游标中。例如:
CREATE OR REPLACE procedure test (ret out sys_refcursor)
as
begin
open ret for select col_name from table;
end test;