Using limit - collection method, PL-SQL Programming

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 you must specify in its type definition). For illustration, when the maximum size of varray projects is 25 elements, then the IF condition below is true:

IF projects.LIMIT = 25 THEN...

You can use LIMIT where an integer expression is allowed. In the illustration below, you use LIMIT to determine if you can add 20 more elements to the varray projects:

IF (projects.COUNT + 20) < projects.LIMIT THEN...

Posted Date: 10/4/2012 3:14:47 AM | Location : United States







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

Write discussion on Using limit - collection method
Your posts are moderated
Related Questions
Datatypes Every constant and variable has a datatype that specifies the storage format, constraints, and the valid range of values. The PL/SQL gives a variety of predefined dat

Question: (a) In the context of database security explain how the following database features help to enforce security in the database system: (i) Authorisation (ii) Access

Example of GROUP BY and COLLECT Operator Example: Using GROUP BY and COLLECT to obtain C_ER2 SELECT CourseId, CAST ( COLLECT (ROW (StudentId, Mark)) AS ROW (Studen

Using Subqueries A subquery is a query (typically enclosed by parentheses) that appears within another SQL data manipulation statement. If evaluated, the subquery gives a va

Implicit Cursors The Oracle implicitly opens a cursor to process each SQL statement not related with an explicitly declared cursor. The PL/SQL lets you refer to the most recen

ROWID The ROWID returns the rowid (binary address) of a row in the database table. You can use the variables of the type UROWID to store rowids in a readable format. In the il

Nested Tables versus Index-by Tables The Index-by tables and nested tables are just similar. For e.g.  They have similar structure and their individual elements are accessed in

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

Equivalences & Rewrite Rules: If notice that as well as allowing us to prove trivial theorems, and tautologies enable us to establish that certain sentences are saying the sam

Question: a) Given the following relation: Location(loc_id, bldg_code, room, capacity) The underlined field is a primary key. (i) Write a PL/SQL program using the impl