Iterative control:exit statements, PL-SQL Programming

Assignment Help:

EXIT

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:

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


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

BEGIN
...
IF credit_rating < 3 THEN
...
EXIT; -- illegal
END IF;
END;


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.


Related Discussions:- Iterative control:exit statements

What is a record, What Is a Record  ? A record is a group of related...

What Is a Record  ? A record is a group of related data items that stored in the fields, each with its own name and datatype. Assume that you have different data about an em

Fetching with a cursor, Fetching with a Cursor The FETCH statements re...

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

Using commit, Using COMMIT The COMMIT statements end the present trans...

Using COMMIT The COMMIT statements end the present transaction and make permanent any changes made during that transaction. Till you commit the changes, other users cannot acc

How pl/sql resolves the calls? , How Calls Are Resolved? The figure sho...

How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

Data types and representations, Data Types and Representations This ex...

Data Types and Representations This explains the concept possible representation, abbreviated possrep, and explains how these can be used in conjunction with constraints to de

Relational operators-comparison operators, Relational Operators The rela...

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

Overview of control structures-comparison operators, Overview of control st...

Overview of control structures According to the structure theorem, any computer program can be written by using the basic control structures as shown in figure below. They can b

Scoping-naming conventions, Scoping Within the similar scope, all the de...

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Need to change mysql query to pdo, Need to change mysql query to PDO Pro...

Need to change mysql query to PDO Project Description: I want someone to convert me 1 .php file that includes some sql/mysql stuff to PDO is a very small file. Skills requ

Data types in sql - interval, Data Types in SQL - Interval, Boolean I...

Data Types in SQL - Interval, Boolean INTERVAL for values denoting, not intervals (!) but durations in time, such as 5 years, 3 days, 2 minutes, and so on. BOOLEAN, con

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd