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
Question: (a) In the context of database security explain how the following database features help to enforce security in the database system: (i) Authorisation (ii) Access

Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie

Assigning and Comparing Collections One collection can be assigned to other by an SELECT, INSERT, UPDATE, or FETCH statement, an assignment statement, or by a subprogram call. A

"Not Enforced" Table Constraints A constraint that is not enforced is not really a constraint within the meaning of the act, but SQL does have such a concept and it needs to b

LONG and LONG RAW You use the LONG datatype to store the variable-length character strings. The LONG datatype is such as the VARCHAR2 datatype, except that the maximum length o

Datatype Conversion At times it is necessary to convert a value from one datatype to another. For e.g. if you want to inspect a rowid, you should convert it to a character stri

Using %ROWTYPE The %ROWTYPE attribute gives a record type which represents a row in a table (or view). The record can store the whole row of data selected from the table or fetc

Project Description: I want to rebuild it and add better content to it It will include up to 5 forms The data will be saved on SQL server and the data access layer could b

Scope and Visibility The References to an identifier are resolved according to its visibility and scope. The scope of an identifier is that area of a program unit (subprogram, b

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