Reputation: 492
Can we have member function for an associative array in Oracle?
DECLARE
TYPE country_list IS TABLE OF VARCHAR2(50)
INDEX BY VARCHAR2(5);
and I want to add a member function as to_char()
that will print all the items in its own list (just like java toString()
for maps/arraylist).
How to do this?
Upvotes: 1
Views: 165
Reputation: 59456
You cannot create a member function on an Associative array
. This is only possible on OBJECT
Types.
You must write the function using the "classic" structured programing.
Upvotes: 1