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.
LNPLS1132Topics
LNPLS1005collection_method_call ::=
LNPLS1006collection
Name of the collection whose method you are invoking.
LNPLS1007COUNT
Function that returns the number of elements in the collection, explained in "COUNT Collection Method".
LNPLS1008DELETE
Procedure that deletes elements from the collection, explained in "DELETE Collection Method".
LNPLS1133Restriction on DELETE If collection
is a varray, you cannot specify indexes with DELETE
.
LNPLS1012index
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").
LNPLS1009EXISTS
Function that returns TRUE
if the index
th element of the collection exists and FALSE
otherwise, explained in "EXISTS Collection Method".
LNPLS1134Restriction on EXISTS You cannot use EXISTS
if collection
is an associative array.
LNPLS1010EXTEND
Procedure that adds elements to the end of the collection, explained in "EXTEND Collection Method".
LNPLS1135Restriction on EXTEND You cannot use EXTEND
if collection
is an associative array.
LNPLS1011FIRST
Function that returns the first index in the collection, explained in "FIRST and LAST Collection Methods".
LNPLS1013LAST
Function that returns the last index in the collection, explained in "FIRST and LAST Collection Methods".
LNPLS1014LIMIT
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".
LNPLS1015NEXT
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".
LNPLS1016PRIOR
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".
LNPLS1017TRIM
Procedure that deletes elements from the end of a collection, explained in "TRIM Collection Method".
LNPLS1136Restriction on TRIM You cannot use TRIM
if collection
is an associative array.
LNPLS1137number
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"
LNPLS1138In this chapter:
LNPLS1139In other chapters: