Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL Insert Question
This query does not filter out the records that already exist, and I get primary key constraint violated. I broke the query into two PL/SQL sections to get it to work. Thanks in advance....
insert into table1
select a.primary_key from table2 a where not exists
( select * from table1 b
where a.primary_key = b.primary_key ); Received on Fri Sep 19 1997 - 00:00:00 CDT