接下来我的最后一个问题(
Table Variables in Oracle PL/SQL?)…
一旦你在数组/表中有值,你又怎么把它们重新出来呢?最好使用select语句或类似的东西?
这是我到目前为止
declare
type array is table of number index by binary_integer;
pidms array;
begin
for i in (
select distinct sgbstdn_pidm
from sgbstdn
where sgbstdn_majr_code_1 = 'HS04'
and sgbstdn_program_1 = 'HSCOMPH'
)
loop
pidms(pidms.count+1) := i.sgbstdn_pidm;
end loop;
select *
from pidms; --ORACLE DOESN'T LIKE THIS BIT!!!
end;
我知道我可以使用dbms_output.putline()输出它们,但我希望从任何其他表中选择一个结果集.
提前致谢,
马特