Dear Masters,
I have a problem on comparing data.
I have two databases that have a similar (if not same) tables, but holds different data, and I want to merge the two tables. But can't seem to figure the easy way to do that, again and again I use script (PHP) to do that, which is take a long time.
The tables which I mentioned is like this, I have two databases, A and B, stored in different server, in each of the databases, I have table called t, so it will be like A.t and B.t. The t table holds schema like
id, username, email, password.
The thing is, each of the table, holds different data, yet many of them share the same data in terms of username or email. One of the table has more records than others, say, A.t has more records than B.t. Now, I would like to merge them into one table, with A.t to be the main reference (because it holds more records). So, any of record in B.t that has similarity with record in A.t will have to be thrown out, and any record that is different, will have to be putted in A.t.
Are there any ways to do that within database level?
Any guidance is truly appreciated, please enlightened me :D
Thanks in advance.