1.

How To Use "for" Statements?

Answer»

If you have a block of CODES to be EXECUTED REPEATEDLY over a RANGE of values, you can use the "FOR ... LOOP" STATEMENT. Here is a sample script on FOR statements:

DECLARE total NUMBER := 0; BEGIN FOR i IN 1..10 LOOP total := total + i; END LOOP; DBMS_OUTPUT.PUT_LINE('Total: ' || TO_CHAR(total)); END;

If you have a block of codes to be executed repeatedly over a range of values, you can use the "FOR ... LOOP" statement. Here is a sample script on FOR statements:



Discussion

No Comment Found