Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E17126-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Collection Method Invocation

A collection method is a built-in PL/SQL subprogram that returns information about a collection or operates on a collection.

Topics:

Syntax

collection_method_call ::=

collection_method_call
Description of the illustration collection_method_call.gif

Semantics

collection_name

The name of a collection.

COUNT

A function that returns the number of elements in the collection, explained in "COUNT Collection Method".

DELETE

A procedure that deletes elements from the collection, explained in "DELETE Collection Method".

Restriction on DELETE If collection_name identifies a varray, you cannot specify indexes with DELETE.

index

A numeric expression whose value has data type PLS_INTEGER or a data type that can be implicitly converted to PLS_INTEGER (see "PLS_INTEGER and BINARY_INTEGER Data Types").

EXISTS

A function that returns TRUE if the indexth element of the collection exists and FALSE otherwise. For more information, see "EXISTS Collection Method".

Restriction on EXISTS You cannot use EXISTS if collection_name identifies an associative array.

EXTEND

A procedure that adds elements to the end of the collection, explained in "EXTEND Collection Method".

Restriction on EXTEND You cannot use EXTEND if collection_name identifies an associative array.

FIRST

A function that returns the first subscript in the collection, explained in "FIRST and LAST Collection Methods".

LAST

A function that returns the last subscript in the collection, explained in "FIRST and LAST Collection Methods".

LIMIT

A function that returns the maximum number of elements that the collection can have. If the collection has no maximum size, LIMIT returns NULL. For an example, see "LIMIT Collection Method".

NEXT

A function that returns the subscript of the succeeding existing element of the collection, if one exists. Otherwise, NEXT returns NULL. For more information, see "PRIOR and NEXT Collection Methods".

PRIOR

A function that returns the subscript of the preceding existing element of the collection, if one exists. Otherwise, NEXT returns NULL. For more information, see "PRIOR and NEXT Collection Methods".

TRIM

A procedure that deletes elements from the end of a collection, explained in "TRIM Collection Method".

Restriction on TRIM You cannot use TRIM if collection_name identifies an associative array.

number

The number of elements to delete from the end of a collection. The default is one.

Examples

Related Topics

In this chapter:

In other chapters: