`
sxm2017
  • 浏览: 1644 次
  • 性别: Icon_minigender_1
  • 来自: 常州
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

批量更新 oracle 数据

阅读更多
declare

cursor row_datas is
 
select  c  from a;
        v_id nvarchar2(50);
       v_c nvarchar2(50);--需要更新的字段

Begin
     open row_datas;
     loop
         fetch row_datas into v_id,v_c; --需要更新的字段 顺序
        update b set b.c=v_c  where b.id=v_id;
         exit when row_datas%NOTFOUND;
     end loop;
     close row_datas;
end;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics