神一样的代码
declare cursor c_update is select b.acct_skid, a.acct_id from opt_acct_fdim a, opt_acct_fdim_bkp b where a.acct_id = b.acct_id; v_counter number; begin v_counter := 0; for v_row in c_update loop update opt_acct_fdim set acct_skid = v_row.acct_skid where acct_id = v_row.acct_id; ---注意,这里没有rowid v_counter := v_counter + 1; if (v_counter >= 1000) then commit; v_counter := 0; end if; end loop; commit; end; /