解析mysql與Oracle update的區(qū)別
更新時間:2013年07月04日 08:49:16 作者:
本篇文章是對mysql與Oracle update的區(qū)別進行了詳細的分析介紹,需要的朋友參考下
update :單表的更新不用說了,兩者一樣,主要說說多表的更新
Oracle> Oracle的多表更新要求比較嚴格,所以有的時候不是很好寫,我們可以試試Oracle的游標(biāo)
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......;
復(fù)制代碼 代碼如下:
Oracle> Oracle的多表更新要求比較嚴格,所以有的時候不是很好寫,我們可以試試Oracle的游標(biāo)
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;
復(fù)制代碼 代碼如下:
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......;
相關(guān)文章
node 多種方法連接mysql數(shù)據(jù)庫(最新推薦)
mysql是一個流行的第三方模塊,可以通過npm安裝,在Node.js 中,有多種方法可以連接 MySQL 數(shù)據(jù)庫,本文通過實例代碼講解node 多種方法連接mysql數(shù)據(jù)庫的示例代碼,感興趣的朋友跟隨小編一起看看吧2023-07-07
mysql內(nèi)連接,連續(xù)兩次使用同一張表,自連接方式
這篇文章主要介紹了mysql內(nèi)連接,連續(xù)兩次使用同一張表,自連接方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-12-12
監(jiān)聽mysql表內(nèi)容變化 mysql開啟binlog
這篇文章主要給大家介紹了關(guān)于監(jiān)聽mysql表內(nèi)容變化,mysql開啟binlog的相關(guān)資料,文中通過示例代碼介紹的非常詳細,對大家學(xué)習(xí)或者使用mysql具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧2019-08-08

