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
Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

Disjunction (OR, ∨) Again we have nine rows instead of just four and again, when unknown is not involved, the rows are as for 2VL. Also, when anything is paired with true, t

Defining and Declaring Collections To create the collections, you must define a collection type, and then declare the collections of that type. You can define the VARRAY types a

Using Cursor Attributes To process the SQL data manipulation statements, the SQL engine must opens an implicit cursor named SQL. This cursor's attributes (%FOUND, %NOTFOUND, %

Project Description: I want a small relational database to be built. I want the database to have the subsequent information tables: Employee Information Document storage

Create the four tables and populate them with the given data. Answer the following queries in SQL. 1. Get all part-color/part-city combinations. Note: Here and subsequently, the

Need for Dynamic SQL: You need dynamic SQL in the situations as follows: 1) You would like to execute a SQL data definition statement (like CREATE), a data control statemen

SQL Database: So, an SQL database is one whose symbols are organized into a collection of tables. Now, shows an SQL table as the current value of an SQL variable, ENROLMENT, b

Stored Subprograms Normally, tools (like Oracle Forms) which incorporate the PL/SQL engine can store subprograms locally for later, strictly local execution. Though, to become