Initializing, Populating, and Referencing Collections
Before a collection can be used, it must be initialized (instantiated). Instantiating
a collection is automatic for index-by tables, but for nested tables
and VARRAYs, you must use a special built-in function called a constructor.
Nested tables and VARRAYs, if you recall, start out atomically NULL—that is,
the whole collection is NULL, not just the elements. As in a record, values
can be assigned to a collection en masse or piecemeal. Assigning values to
elements in a collection requires use of subscript notation for the element.
To assign one whole collection to another en masse, you simply use the
assignment operator. Let’s look at examples of initializing and populating
collections.