Table t1 - Fields a, b
Table t2 - Fields a, c
(a is common field between two tables)
I have added the field b in t2 and want to populate data for the same using references in t1
This can be done using following queries (e.g. a = 100, 101, ...)
update t2 set b = (select b from t1 where a = 100 limit 1) where a = 100;
update t2 set b = (select b from t1 where a = 101 limit 1) where a = 101;
Is there way this can be batched?