oracle中批量修改

https://blog.csdn.net/MAOZEXIJR/article/details/81027059?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase
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
);


 

posted @ 2020-05-21 18:18  这都没什么  阅读(2664)  评论(0编辑  收藏  举报