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
Natural Join - SQL In the absence of NATURAL JOIN Example has to be replaced by something rather more longwinded, as shown in Example. Example: Joining IS_CALLED and IS_EN

I want to implement heap sort algorithm in pl sql please share the source code for guidance

Control Structures The Control structures are the most important PL/SQL extension to the SQL. Not only does PL/SQL let you manipulate Oracle data, it lets you process the data

Write a program to implement the inverted file shown in the slides (Simple Index file, LabelID file and Data file).  Use the Avail_List to point at the deleted Label IDs so that th

Functions   The function is a subprogram that calculates a value. The Functions and procedures are structured similar, except that the functions have a RETURN clause. You can

Fetching from a Cursor Variable The FETCH statement retrieve rows one at a time from the product set of a multi-row query. The syntax for the same is as shown: FETCH {curso

Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns

SQL Database: So, an SQL database is one whose symbols are organized into a collection of tables. Now, shows an SQL table as the current value of an SQL variable, ENROLMENT, b

Question: Consider the following relations (primary keys are underlined): AUTHOR (ANo, aname, address, speciality) PUBLISHER (PNo, pname, Location) BOOK (BNo, Title, ISBN,

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin