create or replace type record_msg as object
(
vindex integer,
msg varchar2(20)
);create or replace type sm_msg as table of record_msg ;procedure plsqltest
(
retmsg out sm_msg
)
is
begin
for i in 1 .. 5 loop
retmsg(i).vindex:= i; --运行到这里的时候体是错误:引用未初始化的收集
retmsg(i).msg := ascii(i);
end loop;
end;retmsg怎么初始化??如果type在package里定义,那么上述过程运行就没问题了,package中的type定义如下:
type record_msg is record
(
vindex integer,
msg varchar2(20)
);
type sm_msg is table of record_msg index by BINARY_INTEGER;
(
vindex integer,
msg varchar2(20)
);create or replace type sm_msg as table of record_msg ;procedure plsqltest
(
retmsg out sm_msg
)
is
begin
for i in 1 .. 5 loop
retmsg(i).vindex:= i; --运行到这里的时候体是错误:引用未初始化的收集
retmsg(i).msg := ascii(i);
end loop;
end;retmsg怎么初始化??如果type在package里定义,那么上述过程运行就没问题了,package中的type定义如下:
type record_msg is record
(
vindex integer,
msg varchar2(20)
);
type sm_msg is table of record_msg index by BINARY_INTEGER;
解决方案 »
- oracle每天特定时间自动重启
- 数据汇总统计
- 有oracle填充数据的工具吗?能不能给我介绍一下
- EXP-00008: 遇到 ORACLE 错误 942
- 大家知不知道sap的hr产品一般的价格是多少?
- 我是个菜鸟,问数据库备份的问题
- 启动数据库出错怎么办呀?请各位大侠指点一下。
- 字符集???
- 请问可否将Oracle9i库内容全部复制到Oracle8i?
- 我在oracle里用sql*plus编译sql语句怎么不能见表呢
- 请问oracle中如何判断某字段的值为数值而不是其他字母?
- 请问如何在.net里面调用oracle的函数?是不是跟调用sp一样。我指的函数就是类似用function开头的。而且有返回值的函数怎么调用返回,谢谢
record_msg 在package中是record
在types中是object
(
retmsg out sm_msg
)
is
begin
for i in 1 .. 5 loop
retmsg(i) := record_msg (i,ascii(i));
end loop;
end;
retmsg(i) := record_msg (i,ascii(i)); --运行到这里:引用未初始化的收集
end loop;