View Single Post
Old 09-25-2008, 08:27 AM  
Owen Pierce
Registered User
 
Owen Pierce's Avatar
 
Join Date: Dec 2007
Posts: 95
Quote:
Originally Posted by CAMOKAT View Post
databases.. each has identical structure.. I want to combine entries...
well if the tables in each DB are the same.. then..

INSERT INTO
db1.table
(*)
SELECT
t2.*
FROM
db1.table t2
LEFT OUTER JOIN db2.table t1 ON (t1.id = t2.id)
WHERE
t1.id IS NULL


just make sure the permissions of the user you are runnign this as has access to both db's.
Owen Pierce is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote