Notice: Constant WP_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 107

Notice: Constant WP_MAX_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 108
While loop pl sql oracle - CodesJava

CodesJava

Easy learning with example program codes

while loop pl sql oracle


Notice: Undefined variable: footnotelist in /home/javawith/public_html/codesjava.com/wp-content/plugins/latex2html/inc/core.php on line 475

PL SQL WHILE LOOP:

The pl sql while loop repeatedly executes a block of statements until a particular condition is true. It first check the condition and executes a block of statements if condition is true.

PL SQL WHILE LOOP syntax:

WHILE condition
 LOOP
   //block of statements;
 END LOOP;

PL SQL WHILE LOOP example:

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

Output:

1
2
3
4
5
6
7
8
9
10

 

Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status