Mysql, update a field of a table with a field of another table

update controller c inner join controller_copy cc on c.cCode = cc.cCode
set c.latitude=cc.latitude, c.longitude=cc.longitude
WHERE c.groupId = 41

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326993385&siteId=291194637