i need merging between 2 databases that includes all the tables which they hold.
f.i: if I have in db_1 a table named: my_table, I will have a similar table with the same structure in db_2 with the same name and the same columns.
the tables might be different only in the data they hold, which means different primary keys for the rows. now i need a service or a command that can put all this data in one merged table, for all the tables in my new merged database.
In the next level requirement, I need also to do merge in rows that represent the same subject and that one of the rows is more updated, and should override the old row data in the merged table of the merged database.
Hope its more clear now....
Create a new database, with the table in question, but remove all keys (or set duplicate key errors off). SELECT INTO from db1 and db2 INTO db3 all the info you need.
However, create a trigger on db3.table to only allow inserting of rows that don't exist or are newer.