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

Part Number E25519-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
PDF · Mobi · ePub
LNPLS01306

Collection Method Invocation

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

LNPLS1132Topics

Syntax

LNPLS1005collection_method_call ::=

Description of collection_method_call.gif follows
Description of the illustration collection_method_call.gif

Semantics

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 indexth 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.

Examples

Related Topics

LNPLS1138In this chapter:

LNPLS1139In other chapters:

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF