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
Nested Tables versus Index-by Tables The Index-by tables and nested tables are just similar. For e.g.  They have similar structure and their individual elements are accessed in

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

Use of COUNT in SQL It describes and discusses various general methods of expressing constraints, eventually noting that support for "=" with relation operands is sufficient f

Closest Approximation to Relational Union - SQL Actually, just as SQL has several varieties of JOIN, it also has several varieties of UNION, none of which is equivalent to th

Ending Transactions A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program

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

Project Description: I want somebody who can help me with an idea that I have been working on for a few months now. The person will require extensive knowledge of warcraft 3 PvP

Short-Circuit Evaluation When computing a logical expression, the PL/SQL uses short-circuit evaluation. That is, the PL/SQL stops computing the expression as soon as the result

#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..