Header Ads

Header ADS

Reverse a Number on PL/SQL Loop

Reverse a Number on PL/SQL Loop

Topic Introduction: Here we will show how to display a series of numbers by using PL/SQL Loop.  example series no as 99,96,93……9,6,3?

SET SERVER OUTPUT ON

DECLARE
BEGIN
    FOR i IN REVERSE 1 .. 99
    LOOP
        IF MOD (i, 3) = 0
        THEN
            DBMS_OUTPUT.PUT_LINE (i);
        END IF;
    END LOOP;
END;
/

No comments

Theme images by Deejpilot. Powered by Blogger.