復制代碼 代碼如下: Oracle> Oracle的多表更新要求比較嚴格,所以有的時候不是很好寫,我們可以試試Oracle的游標 update ( select t.charger_id_ new_charger_id_ from t_cus_year_status t left join t_customer_infos cus on cus.id_ = t.cus_id_ where.... ) n set n.new_charger_id_ =6;
復制代碼 代碼如下: mysql> update t_cus_year_status t left join t_customer_infos cus on cus.id_ = t.cus_id_ set t.charger_id_ =6 where......;