A WHILE Loop in Oracle PLSQL is used when we are not sure as to how many times the loop’s body should be executed. Unlike LOOP statement, a WHILE LOOP may not get executed even once as the condition to execute a WHILE LOOP is evaluated before execution of the loop. A WHILE LOOP gets […]
loop
CURSOR FOR Loop in Oracle PLSQL
A CURSOR FOR Loop in Oracle PLSQL is used whenever we want to retrieve and process every record within a cursor. The CURSOR FOR loop automatically gets terminated as soon as all the records in the cursor are fetched. The Syntax for the CURSOR FOR LOOP in Oracle PLSQL is: FOR cursor_records IN cursor_name LOOP […]
Loop Statement in Oracle PLSQL
A Loop in Oracle PLSQL is used to execute a portion of code i.e. the body of loop until a specific (exit) condition is not met. In other words, we can say that we use the LOOP statement in Oracle PLSQL when we are not sure as to how many times the loop’s body should […]
FOR Loop in Oracle PLSQL
A FOR Loop in Oracle PLSQL is used to execute a portion of code i.e. the body of loop, a fixed number of times. The Syntax for the FOR LOOP in Oracle PLSQL is: FOR loop_counter IN [REVERSE] low_number .. high_number LOOP { Statements to be executed; } END LOOP; Example of a FOR Loop […]