码迷,mamicode.com
首页 > 数据库 > 详细

oracle中批量修改

时间:2020-05-21 18:58:38      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:mes   upd   pre   oracl   col   date   批量修改   bsp   span   

BEGIN
  FOR cur IN (
    select t.tagcode as code,t.tagname as names from YJX_SER_PARAME p,yjx_tag t where p.label_code = t.tagcode order by t.tagcode
  ) loop 
 
  update YJX_SER_PARAME set label_name =cur.names where label_code= cur.code;
  
  END loop ;
END ;

-- ----------------------------

UPDATE student s
SET s.name = (
SELECT b.name FROM boy b WHERE s.id = b.id AND s.name != b.name
)
WHERE EXISTS (
SELECT 1 FROM boy b WHERE s.id = b.id AND s.name != b.name
);


 

oracle中批量修改

标签:mes   upd   pre   oracl   col   date   批量修改   bsp   span   

原文地址:https://www.cnblogs.com/sjzxxy/p/12932488.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!