mysql - Comparing records in one table to another for large databases in PHP -
i have 2 tables in mysql database. lets there 1800 records in table 1 , 20000 records in table 2. want compare each record in table 1 table 2 , update fields in table 2 records matched.
i want know optimized way this.
the efficient operation update statement using join. this:
update table_2 t2 inner join table_1 t1 on t1.some_id = t2.some_id set t2.some_col = t1.some_col;
Comments
Post a Comment