联表update sql语句
mysql:
update 表名1 set 字段名1 = 字段名2 from 表名1,表名2 where 条件
update a set a.PA01AI01 = b.PA01AI01 from T_INVES_ONLY a,T_INVES_PRH b where a.QUERY_ID = b.QUERY_ID and a.uuid = b.uuid and a.QUERY_ID = '256';
Oracle:
update 表名1 set (字段名,字段名)= (select 字段名,字段名 from 表名2 where 条件)
update T_INVES_ONLY a set a.PA01AI01 = (select PA01AI01 from T_INVES_PRH b where a.QUERY_ID = b.QUERY_ID and a.uuid = b.uuid);