解析mysql与Oracle update的区别

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

解析mysql与Oracle update的区别

  2020-12-15 我要评论
本篇文章是对mysql与Oracle update的区别进行了详细的分析介绍,需要的朋友参考下
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......;

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们