create or replace type type_col as object(e varchar2(36 char),n varchar2(100 char));
create or replace type type_tab as table of type_col;
create or replace function f_return_rowtype(v_id varchar2)
return type_tab
pipelined as
v type_col;
begin
for myrow in (select e, n
from tab e
where
start with e.id = v_id) loop
v := type_col(myrow.e, myrow.n);
pipe row(v);
end loop;
return;
exception
when others then
dbms_output.put_line('sqlcode : ' || SQLCODE);
dbms_output.put_line('sqlerrm : ' || SQLERRM);
end;
Oracle返回表集合函数
最新推荐文章于 2021-04-12 05:54:32 发布