Please tell me the full query in which we create a procedure and store 20 values in a Table using that procedure using loop.
Thnx
Printable View
Please tell me the full query in which we create a procedure and store 20 values in a Table using that procedure using loop.
Thnx
Hi Talha,
i think you want to insert values in a table with ease.....
it is difficult for me to understand your question
please elaborate more....
Try using the forall inside a procedure.
Sample code
[code]
declare
type mytype is varray(3) of number(5);
type dn is varray(3) of varchar2(10);
type lc is varray(3) of varchar2(10);
no mytype :=mytype();
de dn:=dn();
lo lc:=lc();
begin
no:=mytype(1,2,3);
de:=dn('a','b','c');
lo:=lc('ab','bc','cd');
forall i in 1..3
insert into dept values(no(i),de(i),lo(i));
end;
[/code]