我想将表类型作为参数传递给过程。
create or replace package FOO is
type FOOTYPE is record (
FOOTYPE_A varchar2(5) null,
FOOTYPE_B varchar2(5) null,
FOOTYPE_C varchar2(5) null
);
type FOOTYPETABLE is table of FOOTYPE;
...
procedure sendNew (
table_a in FOOTYPETABLE
) is
a number;
begin
...
end sendNew;
...
end FOO;
declare
type bartabletype is table of FOO.FOOTYPE index by binary_integer;
bartable bartabletype;
begin
bartable(0).FOOTYPE_A := '';
bartable(0).FOOTYPE_B := '';
bartable(0).FOOTYPE_C := '';
bartable(1).FOOTYPE_A := '';
bartable(1).FOOTYPE_B := '';
bartable(1).FOOTYPE_C := '';
FOO.sendNew(bartable);
end;
但甲骨文说:
“ora-00306 参数数量或类型错误”。
为什么?