Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> newbie question about inserting using cursors
Hi,
I'm using the following code to select a few records from one table and then insert them into another using a cursor.
declare
cursor people2_cur is
select *
from PEOPLE
where SAL>2000;
people2_rec PEOPLE2%ROWTYPE;
begin
for rec1 in people2_cur
loop
insert into PEOPLE2 values(rec1.MNR, rec1.NAME, rec1.ADRES, rec1.CITY,rec1.SAL); exit when people2_cur%NOTFOUND;
Is it possible to use a more general value-description in the insert?
Instead of using:
insert into PEOPLE2 values(rec1.MNR, rec1.NAME, rec1.ADRES, rec1.CITY,rec1.SAL);
something like :
insert into PEOPLE2 rec1;
to insert the whole record rec1 ?
Thanks in advance,
Nico. Received on Thu Feb 07 2002 - 07:00:32 CST