O'Reilly logo

Advanced Oracle PL/SQL Developer's Guide - Second Edition by Saurabh K. Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PL/SQL collection methods

Oracle provides a set of methods that can work with collections for development operations. The development operations can be deleting an element, trimming the collection type, or fetching first and last subscripts. The syntax for all the collection methods is as follows:

[COLLECTION].METHOD (PARAMETERS)

EXISTS

The EXISTS function checks the existence of an element in a collection. The general syntax of this function is [COLLECTION].EXISTS(<index>). It accepts the subscript as the input argument and searches for it in the associated collection. If the element corresponding to the index exists, it returns TRUE, or else returns FALSE. It is the only method that doesn't raise any exception when used with a collection.

The following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required