Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2) Part Number E25519-05 |
|
|
PDF · Mobi · ePub |
A collection method is a PL/SQL subprogram that either returns information about a collection or operates on a collection.
Name of the collection whose method you are invoking.
Function that returns the number of elements in the collection, explained in "COUNT Collection Method".
Procedure that deletes elements from the collection, explained in "DELETE Collection Method".
Restriction on DELETE If collection
is a varray, you cannot specify indexes with DELETE
.
Numeric expression whose data type either is PLS_INTEGER
or can be implicitly converted to PLS_INTEGER
(for information about the latter, see "Predefined PLS_INTEGER Subtypes").
Function that returns TRUE
if the index
th element of the collection exists and FALSE
otherwise, explained in "EXISTS Collection Method".
Restriction on EXISTS You cannot use EXISTS
if collection
is an associative array.
Procedure that adds elements to the end of the collection, explained in "EXTEND Collection Method".
Restriction on EXTEND You cannot use EXTEND
if collection
is an associative array.
Function that returns the first index in the collection, explained in "FIRST and LAST Collection Methods".
Function that returns the last index in the collection, explained in "FIRST and LAST Collection Methods".
Function that returns the maximum number of elements that the collection can have. If the collection has no maximum size, then LIMIT
returns NULL
. For an example, see "LIMIT Collection Method".
Function that returns the index of the succeeding existing element of the collection, if one exists. Otherwise, NEXT
returns NULL
. For more information, see "PRIOR and NEXT Collection Methods".
Function that returns the index of the preceding existing element of the collection, if one exists. Otherwise, NEXT
returns NULL
. For more information, see "PRIOR and NEXT Collection Methods".
Procedure that deletes elements from the end of a collection, explained in "TRIM Collection Method".
Restriction on TRIM You cannot use TRIM
if collection
is an associative array.
Number of elements to delete from the end of a collection. Default: one.
Example 5-18, "DELETE Method with Associative Array Indexed by String"
Example 5-22, "FIRST and LAST Values for Associative Array Indexed by PLS_INTEGER"
Example 5-23, "FIRST and LAST Values for Associative Array Indexed by String"
Example 5-24, "Printing Varray with FIRST and LAST in FOR LOOP"
Example 5-25, "Printing Nested Table with FIRST and LAST in FOR LOOP"
Example 5-28, "LIMIT and COUNT Values for Different Collection Types"