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 时间类型
- 100分求个数据库启动时报错问题
- 这个表的索引应该怎么建?
- Oracle 9.2在WINDOW下导出的DMP文件在CentOS5.1平台上导入Oracle 10.2中时有警告,在导入过程中该注意些什么?sqlplus连接不上10g的
- xml数据的读取,sql应该怎么写?
- 请看看这个sql语句,在一些机器上有效,在另一些无效,希望指教
- 这个触发器该怎么写,请大侠赐教!
- 用什么编译调试SQLJ 比较好
- oracle恢复问题,求助
- 请问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;