Iterative control: loop statement, PL-SQL Programming

Iterative Control: LOOP  Statements

The LOOP statement executes a series of statements multiple times. There are 3 forms of LOOP statements: LOOP, WHILE-LOOP, & FOR-LOOP.

LOOP

The simplest form of the LOOP statement is the basic loop that encloses a series of statements between the keywords LOOP and END LOOP which is as shown:

LOOP
sequence_of_statements
END LOOP;

With each of the iteration of the loop, the series of statements is executed, then the control resumes at the top of the loop. If extra processing is undesirable or impossible, you may use an EXIT statement to complete the loop. You may place one or more EXIT statements wherever inside a loop, but nowhere outside a loop. There are 2 forms of EXIT statements: EXIT and EXIT-WHEN.

Posted Date: 10/3/2012 5:44:05 AM | Location : United States







Related Discussions:- Iterative control: loop statement, Assignment Help, Ask Question on Iterative control: loop statement, Get Answer, Expert's Help, Iterative control: loop statement Discussions

Write discussion on Iterative control: loop statement
Your posts are moderated
Related Questions
Project Description: I am looking to change FullCalendar to add/delete sql server data when events are removed or dropped from Calendar. Events should only be included by dra

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.

Tables within a Table - SQL Figure here is an exact copy of the one in the theory book and as before it is just an alternative way of representing some of the information con

DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows

Autonomous versus Nested Transactions Though an autonomous transaction is started by the other transaction, it is not a nested transaction for the reasons shown below: (i)

Keyword and Parameter Description: table_reference: This specifies a table or view that should be accessible when you execute the DELETE statement, and for that you must


Collections:   The collection is an ordered group of elements, all of similar type (for illustration, the grades for a class of students). Each element has an exclusive subsc

Parameter and Keyword Description: collection_name: This keyword identifies the index-by table, nested table, or varray formerly declared within the present scope. cu

IN Mode An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value.