sql - Column not found when trying a cross database update in mysql -
I am attempting to copy the contents of a column in a mysql database to another in mysql database in the same table .
I am using:
UPDATE db1.table SET db1.table.name = db2.table.name, db1.table.address = db2.table. Address WHERE db1 .table.id = db2.table.id;
I get error 1054: Unknown column 'db2.table.id' in 'clause'.
Both tables have ID columns, so I'm not sure why this will not work, I am logged in as an administrator, and both have full rights to the database.
update db1 .table JOIN db2.table ON db1.table.id = db2. Table.id sET db1.table.name = db2.table.name, db1.table.address = db2.table.address
Comments
Post a Comment