Understanding varrays, PL-SQL Programming

Understanding Varrays

The Items of type VARRAY are termed as the varrays. They permit you to relate a single identifier with the whole collection. This relationship lets you manipulate the collection as an entire and reference individual elements easily.

 

1082_Understanding Varrays.jpg

                                                   Figure: Varray of Size 10


The varray has a highest size that you must specify in its type definition. Its index has a fixed lower bound of 1 and an extensible upper bound. For e.g. the current upper bound for varray Grades is 7, but you can expand it to 8, 9, or 10. And hence, a varray can contain a varying number of elements, from zero (when empty) to the highest specified in its type definition.

Posted Date: 10/3/2012 6:31:02 AM | Location : United States







Related Discussions:- Understanding varrays, Assignment Help, Ask Question on Understanding varrays, Get Answer, Expert's Help, Understanding varrays Discussions

Write discussion on Understanding varrays
Your posts are moderated
Related Questions
Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

SQL Is a Database Language: The commands given to a DBMS by an application are written in the database language of the DBMS. The term data sublanguage is sometimes used instea

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

Example of Using Aggregation on Nested Tables Example: How many students sat each exam WITH C_ER AS (SELECT CourseId, CAST (TABLE (SELECT DISTINCT StudentId, Mark FROM EXAM

Cursor Variables As Parameters You can declare the cursor variables as the formal parameters of the functions and procedures. In the illustration below, you define the REF CUR

Parameter & Keyword Description: function_name: The user-defined function is identifying by that keyword. parameter_name: This identifies the formal parameter that

Using Pragma RESTRICT_REFERENCES: The function called from the SQL statements should obey certain rules meant to control the side effects. To check for violation of the rules,

Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Packaging Cursors   You can split a cursor specification from its body for placement in a package. In that way, you can change the cursor body without changing the cursor spec

Parameter Aliasing   To optimize the subprogram call, the PL/SQL compiler can decide between the two techniques of the parameter passing. With the by-value techniques, the v