I have two SQL databases in phpMyadmin, db1 and db2. Say db1 has 3 tables: 1_a, 1_b, 1_c; and db2 has 3 tables: 2_d, 2_e, 2_f. I would like to transfer my db1's 1_a,1_b,1_c over to db2 and replace with db2's 2_d,2_e,2_f.
So, firstly, I will have to select 1_a, 1_b, 1_c tables from db1, and export them as a SQL file. Afterwards, I will have to select 2_d,2_e,2_f tables from db2, and drop them from db2. Thirdly, I just have import the file from first step to db2.
I am wondering what are the correct SQL statements for first and second steps? Assuming all tables that I am going to move around have their prefix like 1_x and 2_x, and there are some other tables in db1 and db2 that has no prefix and I do not want to touch them. Appreciate your answers.