--Write a PL_SQL block to insert numbers into temp table Using For Loop
Example :-
Insert the numbers 1..10 excludining 6
BEGIN
FOR i in 1..10 LOOP
IF i = 6 THEN
null;
ELSE
INSERT INTO temp(results)
VALUES (i);
END IF;
END LOOP;
COMMIT;
END;
Execute a PLSQL statement to verify that your PLSQL BLock Worked.
Select * from temp;
0 comments:
Post a Comment