Home » SQL & PL/SQL » SQL & PL/SQL » appending table data
appending table data [message #39311] Fri, 05 July 2002 02:43 Go to next message
prem kumar
Messages: 3
Registered: May 2002
Junior Member
I want to append the table data.
I had same tables from different sections, I want to add these data. here the key field is section_id.
Re: appending table data [message #39318 is a reply to message #39311] Sat, 06 July 2002 02:00 Go to previous message
oxkar
Messages: 9
Registered: May 2002
Junior Member
You could use something like this:

INSERT INTO table1
(SELECT * FROM table2 a
WHERE NOT EXISTS
(SELECT '' FROM table1 b WHERE b.mypkfields=a.mypkfileds))

Hope this helps.
Previous Topic: Tunning a SQL statement
Next Topic: For....Balaji.K.L
Goto Forum:
  


Current Time: Fri Apr 26 08:51:57 CDT 2024