views:

146

answers:

1

Is there anyway to create a map data structure in pl/sql.

+2  A: 

There is the PL/SQL associative array

DECLARE
  TYPE salary_tab_t IS TABLE OF NUMBER INDEX BY VARCHAR2(30);
  salary_tab salary_tab_t;
BEGIN
  salary_tab('JONES') := 10000;
  salary_tab('SMITH') := 12000;
  salary_tab('BROWN') := 11000;
END;
Tony Andrews
Is this available with oracle 9i?
yesraaj
@yesraaj: Yes - see http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#1059
Bob Jarvis