I have the main MySQL database which has the following columns in one of the car table:
+---------------+-----------------+------+
|carId |name |model |
+---------------+-----------------+------+
|1 |ford |focus |
|2 |Toyota |Yaris |
+---------------+-----------------+------+
Here is what I looking to achieve:
I want to create the new Database in some other msql server and want to create the same table as above and want to add following columns in the new car table
+---------------+-----------------+------------+-----------+------------+
|carId |name |model |make |workHistory |
+---------------+-----------------+------------+-----------+------------+
|1 |ford |focus |2001 |yes |
|2 |Toyota |Yaris |2002 |no |
+---------------+-----------------+------------+-----------+------------+
- I want the new Database table to get data for
carId,nameandmodelcolumns from the main sql database car table. And would only like to insert data for columns (make,workHistory) in new database car table myself. So this new car table will combine data from the main MySQL database and new Database. - If there is any change in main database car table, I want those changes to be sync with car table in new database. For example if we deleted the ID in main database car table, it should be deleted from the new car table as well.