Dynamic ranges- iterative control, PL-SQL Programming

Dynamic Ranges
The PL/SQL lets you determine the loop range dynamically at run time, as the example below shows:

SELECT COUNT(empno) INTO emp_count FROM emp;
FOR i IN 1..emp_count LOOP
...
END LOOP;

The value of emp_count is unknown at the compile time; the SELECT statement returns the value at the run time.

Posted Date: 10/3/2012 6:00:04 AM | Location : United States







Related Discussions:- Dynamic ranges- iterative control, Assignment Help, Ask Question on Dynamic ranges- iterative control, Get Answer, Expert's Help, Dynamic ranges- iterative control Discussions

Write discussion on Dynamic ranges- iterative control
Your posts are moderated
Related Questions
Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Manipulating Objects: You can use an object type in the CREATE TABLE statement to indicate the datatype of a column. When the table is created once, you can use the SQL statem

Use Object Types and Collections The Collection types and object types increase your efficiency by allowing for the realistic data modeling. The Complex real-world entities an

Using ROLLBACK The ROLLBACK statements end the present transaction and undo any change made during the transaction. The Rolling back is helpful for two reasons. Firstly, if yo

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T

Name Resolution In potentially uncertain SQL statements, the names of the database columns take precedence over the names of the local variables and formal parameters. For e.g.

Obtaining a natural join by specifying the common columns Synatax: SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON USING ( StudentId ) However, a named columns join doe

Oracle 11 G new features associated with this release:- Enhanced ILM  - Information Lifecycle Management (ILM) has been around for the almost 10 years, but Oracle has made

Use Bulk Binds If SQL statements execute inside a loop using the collection elements as bind variables, context switching between the PL/SQL & SQL engines can slow down the ex

Important Distinctions The list of important distinctions are given below: Value versus variable Syntax versus semantics Variable versus variable reference