Reputation: 10524
Is there an easy way to refer to the index type of an associative array in PLSQL while declaring a variable that represents its key?
I am looking for a language construct similar to the following one.
DECLARE
i number;
j i%type;
BEGIN
null;
END;
I would like to be able to do something like that.
DECLARE
type ty_my_type is table of number index by varchar2(4);
my_array ty_my_type;
-- key my_array.key%type;
-- or
-- key my_array%keytype;
BEGIN
null;
END;
Upvotes: 2
Views: 56