创建左连接 语句如下:select * from A Left JOIN B ON A.Aid=B.Bnameid
用一个表的某些列update另一个表
SET SQL_SAFE_UPDATES = 0; #安全模式下不能升级,改成0update customer, history set customer.zmxy = history.score where customer.id = history.user_id;