1. 程式人生 > >查詢一張表的資料去更新另一張表

查詢一張表的資料去更新另一張表

update zmt_wx_user as t1 set user_fan_count=(select t2.fans from zmt_wechat_official as t2 where t2.id < 386 and t1.user_id=t2.id and t1.uid=t2.zmt_user_id) WHERE t1.user_id < 386;