您好,欢迎来到微智科技网。
搜索
您的当前位置:首页table() function

table() function

来源:微智科技网

-- create objects
create or replace type obj_type1 as object (
  c1 int,
  c2 int
);
/

create or replace type obj_tbl_type1 as table of obj_type1;
/

+++++++++++++++++++++++++++++++++++++++++

create or replace function func1
return obj_tbl_type1
pipelined
is
  v_obj obj_type1;
begin
  for idx in 1 .. 100 loop
    v_obj := obj_type1(idx, idx);
    pipe row(v_obj);
  end loop;
end;
/

++++++++++++++++++++++++++++++++++++++++++

 

select * from table(func1());

        C1         C2
---------- ----------
         1          1
         2          2
         3          3
         4          4
         5          5
...
        99         99
       100        100

转载于:https://www.cnblogs.com/kevinkim/archive/2012/02/22/2363366.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 7swz.com 版权所有 赣ICP备2024042798号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务