test5.txt 220 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 update bsth_c_s_sp_info a set a.schedule_plan = ( select sp_id from bsth_c_s_sp_r_info b where a.id = b.sp_info_id ) where a.schedule_plan is null select count(*) from bsth_c_s_sp_info where schedule_plan is null