create or replacefunction get_productsreturn t_ref_cursor isv_products_ref_cursor t_ref_cursor;beginopen v_products_ref_cusor forselect value(op)from object_products oporder by op.id;return v_products_ref_cursor;end get_products;
1 回答

慕斯王
TA貢獻1864條經驗 獲得超2個贊
可能是t_ref_cursor沒有進行定義吧。像下面這樣寫試一下,將t_ref_cursor定義一下,看看是否好用。
create or replace function get_products() return t_ref_cursor is
cursor t_ref_cursor is
select op.*
from object_products op
order by op.id;
v_products_ref_cursor t_ref_cursor;
begin
for v_products_ref_cusor in t_ref_cursor;
return v_products_ref_cursor;
end get_products;
- 1 回答
- 0 關注
- 115 瀏覽
添加回答
舉報
0/150
提交
取消