oracle从a表更新b表

--如果所有的记录都匹配

update gsis_xw_bks set bylwf = (select bylwf from gsis_xw_bks_20130608 where gsis_xw_bks.resource_id = gsis_xw_bks_20130608.resource_id);

--如果存在不匹配的记录。
update gsis_Xw_bks set bylwf = (select bylwf from gsis_xw_bks_20130608 where gsis_Xw_bks.resource_id = gsis_xw_bks_20130608.resource_id)
where resource_id in (select distinct AY_LOG_ID from gsis_xw_bks_20130608) ;

你可能感兴趣的:(oracle)