乙個oracle函式返回陣列的例子

2021-04-12 19:30:24 字數 579 閱讀 4923

create or replace type t_ret_table is table of varchar2(20);

create or replace function f_test(var_num in integer) return t_ret_table is

var_out t_ret_table;

begin

var_out := t_ret_table();

var_out.extend(var_num);

for i in 1..var_num loop

var_out(i) := i;

end loop;

return var_out;

end f_test;

/set serverout on

declare

aa t_ret_table;

begin

aa := f_test(10);

for i in 1..aa.count loop

dbms_output.put_line(aa(i));

end loop;

end;

/

乙個簡單的oracle函式返回陣列的例子 zz

乙個簡單的oracle函式返回陣列的例子 zz create or replace type t ret table is table of varchar2 20 create or replace function f test var num in integer return t ret t...

oracle 函式返回乙個集合

create or replace function text starttime in varchar2,endtime in varchar2,timetype in number,spid in number,pagesize in number,currentpage in number,d...

做乙個返回陣列的函式 DELPHI

1.type tarray array of string procedure trimchar s string var sret tarray function countchar s string c char integer vari integer begin result 0 for i...