我在包的规范中定义了以下类型
type column_info is record (col_name varchar2(20), col_value varchar2(1000));
type c_info is varray(10) of column_info;
type table_info is record (table_name varchar2(20), col_info c_info);
在声明部分包体中我有
t_info table_info;
在我拥有的包体内的程序内部
t_info:=null;
t_info.table_name:='gl_temp_report1';
t_info.col_info(1).col_name:='table_idx';
t_info.col_info.extend;
t_info.col_info(2).col_name:='table_row';
t_info.col_info.extend;
t_info.col_info(3).col_name:='table_row_detail';
即使包编译成功,在运行时我也会收到异常 ORA-06531: Reference to uninitialized collection 。
我如何初始化 col_info 集合?我试图初始化 t_info.col_info() 但我得到“没有功能”这样的一个。TIA,奥雷尔