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
Assignment Statement: The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by

DBMS_OUTPUT: The Package DBMS_OUTPUT enables you to display output from the PL/SQL subprograms and blocks, that makes it easier to test and debug them. The procedure put_ line

Special cases of projection This section describes the identity projection, r {ALL BUT}, and the projection on no attributes, r { }, which yields TABLE_DUM when r is empty, ot

Closing a Cursor The CLOSE statements disable the cursor, and the result set becomes undefined. An illustration of the CLOSE statement as shown: CLOSE c1;

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

Manipulating Local Collections Within PL/SQL, to manipulate the local collection, by using the  TABLE and CAST operators . The operands of CAST are a collection declared locally

What Is a Package? The package is a schema object that group logically related PL/SQL items, types, and subprograms. The Packages usually have 2 parts, a specification & a bo

Create a procedure named STATUS_SHIP_SP that allows a company to employee in the Shipping Department to update the status of an order to add shipping information. The BB_BASKETSTAT

LEVEL You use the LEVEL with the SELECT CONNECT BY statement to categorize rows from a database table into a tree structure. The LEVEL returns the level number of a node in a

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr