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......;

标签:
mysql,Oracle_update,区别

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“解析mysql与Oracle update的区别”

暂无“解析mysql与Oracle update的区别”评论...