user_id active_date <---move this to TableB name address gender
num_id user_id gen_sub_id
SELECT TableA.user_id, TableA.active_date, TableB.gen_sub_id FROM `TableA` JOIN `TableB` WHERE TableA.user_id = TableB.user_id
I assume you have rows in your both tables
alter table Table_2 Add active_date datetime UPDATE B SET B.active_date = A.active_date from Table_2 B INNER JOIN Table_1 A ON A.user_id = B.user_id
Lastly, you can drop active_date column from Table_1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)