I have three databases in same server which having same kind of tables as below.
City
id -> primary_key
name
Contacts
id -> primary_key
city_id -> foreign_key
name
number
First and second databases having some cities and contacts related to those cities. Now I want to insert all the data from both the databases into third database. So I tried it with import/export database but primary key values are being conflicted.
For city table I can insert data manually as 2 3 cities are there in both the databases but it's not convenient for contacts as contacts are approx 5000. So how can I do it with some easy way?