While Loop in PL/SQL

Google Advertisements

PLSQL Conditional Statement PLSQL Procedure

For While in PL/SQL

Set of instructions given to the compiler to execute set of statements until condition becomes false is called loops. The basic purpose of loop is code repetition that means same code repeated again and again. Here we discuss While loop in PLSQL

A while loop is used when a set of statements has to be executed as long as a condition is true, the While loop is used. The condition is decided at the beginning of each iteration and continues until the condition becomes false.

Syntax

variable initialize

while (condition)
statements;
end loop;

Must be follow below steps;

  • Initialise a variable before the loop body.
  • Increment the variable in the loop body.

While Loop in PLSQL

DECLARE  
i INTEGER := 1;  
BEGIN  
WHILE i <= 10 LOOP  
DBMS_OUTPUT.PUT_LINE(i);  
i := i+1;  
END LOOP;  
END;  

Output

1
2
3
4
5
6
7
8
9
10

PLSQL Conditional Statement PLSQL Procedure

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements


Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: hitesh.xc@gmail.com or 8076671483 Try this Keyword C++ Programs