Use of Other
Built-in Methods for Collections
TRIM -- Trim removes instances from a
collection. TRIM used with no arguments removes the last instance,
TRIM(n) removes "n" instances from the collection.
DELETE -- DELETE removes specified items from a
nested table or all of a VARRAY. DELETE specified with no arguments
removes all instances of a collection. For nested tables only
DELETE(n) removes the nth instance and DELETE(n,m) deletes the nth
through the mth instances of the nested table that relate to the
specified master record.
Remember when using these methods that a VARRAY
is a dense type, that its values start at one and go to the last
filled value as far as the index is concerned with no breaks and no
null values allowed. A nested table is allowed to have deleted
values (i.e. it can be "sparse"). Therefore if you attempt to use a
method that is inappropriate such as DELETE with an argument against
a VARRAY you will receive an error.