我想用整数填充集合,但出现错误
包装规格:
type rec_int is record ( i integer );
type typ_int is table of rec_int;
在包装体内
function test_randset return pls_integer is
int_array typ_int;
ret pls_integer;
begin
int_array(1) := 1;
ret := randset(int_array);
return ret;
end;
错误
Error: PLS-00382: expression is of wrong type
Line: 50
Text: int_array(1) := 1;
Error: PL/SQL: Statement ignored
Line: 50
Text: int_array(1) := 1;
看起来你的帖子主要是代码;请添加更多详细信息。 看起来你的帖子主要是代码;请添加更多详细信息。 看起来你的帖子主要是代码;请添加更多详细信息。
int_array
是一个 typ_int
,它有一个名为 i
的属性,所以赋值应该是
int_array(1).i := 1;
而不是这个:
int_array(1) := 1;