请问这个get_products 函数为什么会有这个报错?

create or replace
function get_products
return t_ref_cursor is
v_products_ref_cursor t_ref_cursor;
begin
open v_products_ref_cusor for
select value(op)
from object_products op
order by op.id;
return v_products_ref_cursor;
end get_products;

慕娘9325324
浏览 102回答 1
1回答

慕斯王

可能是t_ref_cursor没有进行定义吧。像下面这样写试一下,将t_ref_cursor定义一下,看看是否好用。create or replace function get_products() return t_ref_cursor iscursor t_ref_cursor isselect op.*from object_products oporder by op.id;v_products_ref_cursor t_ref_cursor;beginfor v_products_ref_cusor in t_ref_cursor;return v_products_ref_cursor;end get_products;
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Oracle