Search This Blog

Friday, November 8, 2013

Oracle FOR LOOP

Oracle > FOR LOOP IN

The syntax for the FOR Loop In Oracle is:

FOR loop_counter IN [REVERSE] lowest_number..highest_number
LOOP
{.statements.}
END LOOP;

Example:

begin
  for i in 1..10 loop
    DBMS_OUTPUT.PUT_LINE (i);
   end loop ;
end ;
/