您的位置:首页 > 数据库 > Oracle

解析mysql与Oracle update的区别

2013-07-04 00:00 579 查看
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......;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: