存储过程中自定义varray数组 create or replace procedure proc_selectAnyone()
as
type type_array is varray(11) of varchar2(2); --定义长度为11的数组
init_array type_array :=type_array('01','02','03','04','05','06','07','08','09','10','11');
--初始化数组的11个字符
begin
for i in 1..init_array.count loop
dbms_output.put_line(init_array(i));
end loop;
end proc_selectAnyone;
执行后,出错!
Warning: Procedure created with compilation errors
CREATE OR REPLACE PROCEDURE TEST1 AS
TYPE TYPE_ARRAY IS VARRAY(11) OF VARCHAR2(2); --定义长度为11的数组
INIT_ARRAY TYPE_ARRAY := TYPE_ARRAY('01',
'02',
'03',
'04',
'05',
'06',
'07',
'08',
'09',