This content has been marked as final. Show 7 replies
Where do these numbers come from? Do you care?1 person found this helpful
If you don't care
insert into loc_number select rownum from dual connect by level <= 10;
Why you want to use pl/sql when it can be done with simple sql as APC showed?
Thanks for the response,
If it possible to insert using for loop in pl sql?
Yes its possible1 person found this helpful
begin FOR counter IN 1..10 LOOP insert into loc_number values(counter); END LOOP; end;
-- duplicate post
Edited by: Suri on Feb 18, 2013 5:03 PM
Yes it is possible.
Why do you want to use loops here ?
(I'm assuming, you need this for practice purpose)
begin for i in 1..10 loop insert into loc_number values (i); end loop; commit; end;
Yup its just for practice purpose