1. 程式人生 > >update left join 多表關聯更新,

update left join 多表關聯更新,

UPDATE table_1 t1 left join table_2 t2 on t2.id = t1.tid SET t1.username = t2.uname
where t1.id>5;

單張表自聯,多表關聯更新都可以。