Using the collection methods, PL-SQL Programming

Using the Collection Methods

The collection methods below help to generalize the code and make collections easier to use and also make your applications easier to maintain:

EXISTS

COUNT

LIMIT

FIRST and LAST

PRIOR and NEXT

EXTEND

TRIM

DELETE

A collection method is a built-in function or the process that operates on collections and is called using the dot notation. The syntax is as shown below:

collection_name.method_name[(parameters)]

The Collection methods can be called from the procedural statements but not from the SQL statements. The COUNT, EXISTS, LIMIT, FIRST, PRIOR, LAST, & NEXT are the functions, that appear as a part of an expression. And EXTEND, DELETE, and TRIM are the procedures that appear as a statement. Also, the EXISTS, TRIM, PRIOR, NEXT, EXTEND, and DELETE take parameters. Each parameter should be an integer expression. Only the EXISTS can be applied to automatically null collections. Whenever you apply another method to such type of collections, then the PL/SQL raises COLLECTION_IS_NULL.

Posted Date: 10/4/2012 3:12:26 AM | Location : United States







Related Discussions:- Using the collection methods, Assignment Help, Ask Question on Using the collection methods, Get Answer, Expert's Help, Using the collection methods Discussions

Write discussion on Using the collection methods
Your posts are moderated
Related Questions
Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:

Aggregate Assignment The %ROWTYPE declaration cannot include an initialization clause. Though, there are two ways to assign values to all fields in a record at once. At First, t

Semidifference via EXCEPT and JOIN - SQL SELECT * FROM (SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' EXCEPT DISTINCT CORRESPONDING SELECT StudentId

Effects of NULL in Aggregate Operator - SQL Let aggop(x) be an invocation of some aggregate operator aggop in SQL, where x is an expression (usually an open expression) to be

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat

Need to change mysql query to PDO Project Description: I want someone to convert me 1 .php file that includes some sql/mysql stuff to PDO is a very small file. Skills requ

Constants and Variables:   You can declare the constants and variables in the declarative section of any PL/SQL subprogram, block, or package. The Declarations allot the stor

Using %TYPE The %TYPE attribute gives the datatype of a variable or the database column. In the example below, the %TYPE gives the datatype of a variable: credit REAL(7,2); debi

The requirements as follows: Create a folder called "SECURITY" on the server and upload all your project files to that folder. Please note, the "SECURITY" folder is NOT to be IN