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
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

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

EXIT-WHEN The EXIT-WHEN statement permits a loop to complete conditionally. Whenever the EXIT statement is encountered, the condition in the WHEN clause is computed. When the co

Effects of NULL Operator As a general rule-but not a universal one-if NULL is an argument to an invocation of a system-defined read-only operator, then NULL is the result of t

a. Write an anonymous block that contains a PL/SQL function. Given an order number orderNo, the function will calculate the total number of the parts in the order. Then the anonym

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

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl

Parameter and Keyword Description: select_item: This select_item is a value returned by the SELECT statement, and then assigned to the equivalent variable or field in the

Question 1 . Compare SQL and PL/SQL Question 2 . Write a database trigger to implement the following check condition                          Given the following table

Providing Results of Queries Expressing queries in SQL is the (big) subject. Here I present just a simple example to give you the flavour of things to come in those chapters.