oracle對查詢到的字段進行遍歷插入數據庫


declare
     cursor cur_test is select inte_param_inteuuid from sjzx_interface_param group by inte_param_inteuuid; //聲明一個游標cur_test ,其中inte_param_inteuuid 為游標查詢到的數據
begin
   for c in cur_test loop //對cur_test 進行循環遍歷,c相當於每一組數據,c.inte_param_inteuuid即拿到需要的uuid
       insert into sjzx_interface_param t values(next.nextval,sys_guid(),SYSDATE,SYSDATE,'查詢人',next.nextval,c.inte_param_inteuuid,'dqp_name','','查詢','');
   end loop;
 commit;
end;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM