The collection types TABLE and VARRAY allow you to declare index-by tables, nested tables, and variable-size arrays (varrays for short).
To reference an element, use standard subscripting syntax. For example, the following call references the fifth element in the nested table (of type Staff) returned by function new_hires:
TYPE Staff IS TABLE OF Employee;
FUNCTION new_hires (hiredate DATE) RETURN Staff IS
BEGIN … END;
staffer := new_hires(’10-NOV-98′)(5);
Collections work like the arrays found in most third-generation programming languages. Also, collections can be passed as parameters. So, you can use them to move columns of data into and out of database tables or between client-side applications and stored subprograms.