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
Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

MILLER-UREY' S EXPERIMENTAL PROCEDURES - They recreated the probable conditions on the primitive earth in the laboratory. An atmosphere containing hydrogen, ammonia, me

Data Types and Representations This explains the concept possible representation, abbreviated possrep, and explains how these can be used in conjunction with constraints to de

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Relational Algebra - SQL It describes some operators, that together constitute an algebra that is not only relationally complete but also irreducibly so (very nearly- apart f

UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

SQL Functions The PL/SQL uses all the SQL functions involving the following aggregate functions that summarize the whole columns of the Oracle data: GROUPING, AVG, COUNT, STDDE

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Character Types The Character types allow you to store alphanumeric data, represent words and text, and manipulate the character strings. CHAR You use the CHAR dataty

Read-Only Operator (+) - SQL The term read-only operator to the mathematical term function. Here I just need to add that the SQL standard reserves the term function for read-