create type tab_num is table of number;create function f_numbers(p_from number,p_to number)
return tab_num
is
lt tab_num := tab_num();
begin
lt.extend(p_to - p_from + 1) ;
for i in p_from .. p_to loop
lt(i - p_from + 1) := i;
end loop;
return lt;
end;
/select * from table(cast(f_numbers(1,12) as tab_num));
return tab_num
is
lt tab_num := tab_num();
begin
lt.extend(p_to - p_from + 1) ;
for i in p_from .. p_to loop
lt(i - p_from + 1) := i;
end loop;
return lt;
end;
/select * from table(cast(f_numbers(1,12) as tab_num));
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货