PL/SQL中参数为数柤的procedure初始化的问题create or replace procedure WJW_TEST(Tshift in varchar2, Tres out LIST_VARCHAR) is
begin
Tres.Extend;
Tres(1) := 'd';
Tres(2) := 'd';
Tres(3) := 'd';
if(Tshift = 'A') then
Tres(1) := 'A';
Tres(2) := 'A';
Tres(3) := 'A';
else
Tres(1) := 'B';
Tres(2) := 'B';
Tres(3) := 'B';
end if;
end WJW_TEST;
其中LIST_VARCHAR是定义, 这个procedure报出: Ora-06531, 参考示初始化之收集.
begin
Tres.Extend;
Tres(1) := 'd';
Tres(2) := 'd';
Tres(3) := 'd';
if(Tshift = 'A') then
Tres(1) := 'A';
Tres(2) := 'A';
Tres(3) := 'A';
else
Tres(1) := 'B';
Tres(2) := 'B';
Tres(3) := 'B';
end if;
end WJW_TEST;
其中LIST_VARCHAR是定义, 这个procedure报出: Ora-06531, 参考示初始化之收集.
Tres := LIST_VARCHAR();
Tres.Extend(3);