By admin | January 25, 2008

Loop in PL/SQL

The example given below shows a While Loop. Here the value of the variable I is checked to ascertain whether it is less than 10 and as long as it is so the body of the loop will be executed.

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

Digg Facebook Technorati Bloglines

Email This Post Email This Post
Topics: Database |



Leave a Comment

Name:

E-Mail :

Website :

Comments :

Ad

Calendar

November 2008
M T W T F S S
« Oct «-»  
 12
3456789
10111213141516
17181920212223
24252627282930

Search

Polls

  • Who will rule the world?

    View Results

    Loading ... Loading ...