《Mysql必讀解析mysql與Oracle update的區(qū)別》要點:
本文介紹了Mysql必讀解析mysql與Oracle update的區(qū)別,希望對您有用。如果有疑問,可以聯(lián)系我們。
update :單表的更新不用說了,兩者一樣,主要說說多表的更新
代碼如下:
??????
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......;
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/5356.html