Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / PL SQL Programming
 

An example of an anonymous block

DECLARE   hundreds_counter  NUMBER(1,-2); BEGIN   hundreds_counter := 100;   LOOP     DBMS_OUTPUT.PUT_LINE(hundreds_counter);      hundreds_counter := hundreds_counter + 100;    END LOOP;  EXCEPTION  WHEN OTHERS THEN    DBMS_OUTPUT.PUT_LINE('That is as high as you can go.'); END; /