oracle进阶(六)根据一个表字段更新另一个表字段
1.普通情况 update ceshi a set a.fixed_time=(select submit_date from kaifa b where a.service_name=b.task_name ) where exists( select 1 from kaifa b where a.service_name=b.task_name )
2.存在多条子查询 update ceshi a set a.fixed_time=(select submit_date from kaifa b where a.service_name=b.task_name and task_name not in ( select task_name from kaifa group by task_name having count(1)>1 ) ) where exists( select 1 from kaifa b where a.service_name=b.task_name )