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

Part Number E10472-05
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 Call

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 current number of elements in the collection, described in "COUNT Method".

DELETE

A procedure that deletes elements from the collection, described in "DELETE 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 Table 3-10, "Possible Implicit PL/SQL Data Type Conversions").

EXISTS

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

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

EXTEND

A procedure that increases the size of the collection, described in "EXTEND Method".

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

FIRST

A function that returns the first subscript or key value in the collection, described in "FIRST and LAST Methods".

LAST

A function that returns the last subscript or key value in the collection, described in "FIRST and LAST 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 Method".

NEXT

A function that returns the subscript that succeeds index n. If n has no successor, NEXT(n) returns NULL. For more information, see "PRIOR and NEXT Methods".

PRIOR

A function that returns the subscript that precedes index n in a collection. If n has no predecessor, PRIOR(n) returns NULL. For more information, see "PRIOR and NEXT Methods".

TRIM

A procedure that deletes elements from the end of a collection, described in "TRIM 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: