LOOP in PL/SQL
Syntax: LOOP statements END LOOP; Example: DECLARE cntr NUMBER :=0; BEGIN LOOP cntr :=cntr +1; IF cntr>100 THEN Dbms_Output.put_line (cntr); EXIT; END IF; END LOOP;
View ArticleWhile Loop in PL/SQL
Syntax: WHILE < Condition true> LOOP <Statement> END LOOP; Example: DECLARE cnt NUMBER:=0; BEGIN WHILE cnt<=10 LOOP cnt:=cnt+1; Message (‘While loop executes); END LOOP; END;
View ArticleGOTO statement in PL/SQL
Example: IF result= ‘fail’ THEN GOTO fail_msg END IF; <<fail_msg>> Message (“Student is Failed’);
View Article
More Pages to Explore .....