CREATE OR REPLACE PROCEDURE "PRO_TEST"
/**
*
*/
(p_code OUT VARCHAR2 )
as
begin
a(1) :='NATCD';
a(2) :='MRTL';
a(3) :='ABFSH';
a(4) :='ABREL';
a(5) :='MPTYP';
a(6) :='MRTL';
a(7) :='MRTL';
a(8) :='MRTL';
a(9) :='MRTL';
a(10) :='MRTL';
end;
begin
if b>0 then
for i in 1 .. 5 Loop
delete from NU_JF_CONSTANT
/**
*
*/
(p_code OUT VARCHAR2 )
as
--声明b变量为数值类型
b number;
--定义数组a_type 为varchar2(50) 的数组类型
type a_type is table of VARCHAR2(50) INDEX BY BINARY_INTEGER;
--定义变量a的类型为数组
a a_type;begin
begin
--此处将select 结果值赋给b变量
select count(*) into b from temp_nu_jf_constant;end;
--为数组赋值
begina(1) :='NATCD';
a(2) :='MRTL';
a(3) :='ABFSH';
a(4) :='ABREL';
a(5) :='MPTYP';
a(6) :='MRTL';
a(7) :='MRTL';
a(8) :='MRTL';
a(9) :='MRTL';
a(10) :='MRTL';
end;
begin
if b>0 then
for i in 1 .. 5 Loop
delete from NU_JF_CONSTANT