Iterative control:exit statements, PL-SQL Programming


The EXIT statement forces a loop to done unconditionally. Whenever an EXIT statement is encountered, the loop is done immediately and controls the passes to the next statement. An illustration is as shown below:

IF credit_rating < 3 THEN
EXIT; -- exit loop immediately
END LOOP;                   -- control resumes here

The later example represents that you cannot use the EXIT statement to complete a PL/SQL block:

IF credit_rating < 3 THEN
EXIT; -- illegal

Keep in mind that, the EXIT statement should be placed inside a loop. To complete the PL/SQL block before its normal end is reached; you can use the RETURN statement.

Posted Date: 10/3/2012 5:45:14 AM | Location : United States

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

Write discussion on Iterative control:exit statements
Your posts are moderated
Related Questions
Hi,am developing a library system and relating all the table is somehow complex,could you kindly assist me

write the program for traffic control system with 10 second, 15 secod, and 20 second delay

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Operators on Tables and Rows Row Extraction TUPLE FROM r, SQL has row subqueries. These are just like scalar subqueries except that they may specify more than one column.

Need Database Development with Analysis Tools Project Description: I want a database for large governmental and private data sets on one country that can be simply extended t

Question: (a) The objective of query optimization is to choose the most efficient strategy for implementing a given relational query, thereby improving the system performance. On

OPEN-FOR Statement The OPEN-FOR statements execute the multi-row query related with a cursor variable. It also allocates the resources used by the Oracle to process the query a

Effects of NULL in Aggregate Operator - SQL Let aggop(x) be an invocation of some aggregate operator aggop in SQL, where x is an expression (usually an open expression) to be

Rephrase Conditional Control Statements When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops evaluating the expression as s

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,