update 更新多个关联字段

2018-11-22  本文已影响0人  学无_止境

update t_gdzc_zc_info_ t

    set (t.ADDRESS, t.DBADRESSPRE, t.Stationname, t.SIGNALSOURCETAG) =

        (select a.DBADDRESS, a.ADDRESS, a.STATIONNAME, a.SIGNALSOURCETAG

          from T_UPLOAD_XLS_GDZC_ZC_INFO a

          where t.card_code = a.card_code

            and a.batch_id = 'db111')

  WHERE EXISTS

  (SELECT 1FROM T_UPLOAD_XLS_GDZC_ZC_INFO a WHERE t.card_code = a.card_code and a.batch_id = 'db111');

oracle数据库语法

上一篇 下一篇

猜你喜欢

热点阅读