关于合并两个表

创建左连接

 语句如下:select * from A Left JOIN B ON A.Aid=B.Bnameid

用一个表的某些列update另一个表

SET SQL_SAFE_UPDATES = 0;  #安全模式下不能升级,改成0
update customer, history
   set customer.zmxy = history.score
 where customer.id = history.user_id;

posted @ 2017-07-21 15:03  Aogon  阅读(109)  评论(0)    收藏  举报