Jump to content

Compare two tables from two databases


pilixonis

Recommended Posts

you can just use a left or right join with full reference to the tables like:

SELECT * FROM db1.table1 LEFT JOIN db2.table2 ON db1.table1.id = db2.table2.id WHERE db2.table2.id != '';

This should give you the records of db1.table1 that aren't on db2.table2

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.