update 值从临时表取

来源:互联网 发布:网络宣传推广方案 编辑:程序博客网 时间:2024/06/05 18:33
update table1 a
   set id1 =
       (select uuid
          from table2
         where to_number(a.id2) = to_number(id2)
           and rownum = 1)
 where (no1, decode(no2, '', 'A', no2)) in
       (select a.no1, decode(a.no2, '', 'A', a.no2) from table3 a);
0 0
原创粉丝点击