解析MySQL与Oracle update的区别
2022-11-12 09:29:07
内容摘要
这篇文章主要为大家详细介绍了解析MySQL与Oracle update的区别,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!update :单表的更新不用说了
文章正文
这篇文章主要为大家详细介绍了解析MySQL与Oracle update的区别,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!
update :单表的更新不用说了,两者一样,主要说说多表的更新代码如下:
1 2 3 4 5 6 7 8 9 | <code> 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; </code> |
代码如下:
1 2 3 4 5 6 | <code>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......; </code> |
注:关于解析MySQL与Oracle update的区别的内容就先介绍到这里,更多相关文章的可以留意
代码注释