避免大事务,循环批量提交

for ((i=1; i<=10022799916; i =i+100000))
do
    echo "insert into mz_hd_marry_0620 select id, op_type, name_man, name_woman, cert_num_man, cert_num_woman, folk_man, folk_woman, birth_man, birth_woman, marry_status_man, marry_status_woman, reg_qx_man, reg_qx_woman, reg_detail_man, reg_detail_woman, address_now_man, address_now_woman, op_date, dept_name, dept_code, valid_flag, exchange_time, apply_date from mz_hd_marry_back3 where id >=$(($i-100000)) and id <$i"|dbaccess gdb ;

done

猜你喜欢

转载自blog.csdn.net/David_ifx/article/details/106876838
今日推荐