Update table from another database

mysql

Update one field of MySQL table with data from another database.

06.12.2022, Goran Dolenc
Categories: MySQL
Tags: update

Here is the code:

SET SQL_SAFE_UPDATES = 0;

UPDATE db1.tbl A INNER JOIN db2.tbl B
USING (tblFieldID)
SET A.FieldToUpdate = B.FieldToRead;