Using CONNECT BY LEVEL with For Loop Doesn't Work
722885Sep 16 2009 — edited Sep 17 2009The procedure listed below inserts only one record in table whereas i need 10 records to be inserted in table.
this is just a test procedure..
CREATE OR REPLACE PROCEDURE P_TEST
AS
BEGIN
FOR I IN (SELECT LEVEL num FROM dual CONNECT BY LEVEL <= 10)
LOOP
INSERT INTO TEMP_VMS VALUES(I.num);
END LOOP;
END;
END;
/