Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help inserting values into table using a subquery
Hi,
I need to match up a column in two of my tables. Running the following query:
select id from table1
where id not in (select id from table2))
returns 44 rows. I need to have table2 contain the exact same number of rows and id numbers as table1. I tried running this insert statement:
insert into table2(id) values(select id from table1 where id not in (select id from table2))
but get the error:
*ERROR at line 1:
Is it possible to use a subquery to insert several values?
Thanks
D.
Received on Thu Feb 06 2003 - 16:58:58 CST
![]() |
![]() |