oracle 循环插入
declare
forInt number(18);
seqnum number(18);
begin
for forInt in 1..20000 loop
select seq_forum.nextval into seqnum from dual;
insert into frm_answer (ANSWERID, QUESTIONID, PARENTID, ANSWERTYPE, CREATEUSERID, CREATEDATE, UPDATEUSERID, UPDATEDATE, STATUS, STATUSDATE, DISCUSSNUM, SOURCE, UPDATETIME, PRAISEANSWERNUM, CANPRAISEANSWERNUM)
values (seqnum, 144862, null, ‘reply‘, 100225296631, to_date(‘06-01-2015 16:10:16‘, ‘dd-mm-yyyy hh24:mi:ss‘), null, null, ‘E‘, to_date(‘06-01-2015 16:10:16‘, ‘dd-mm-yyyy hh24:mi:ss‘), 0, ‘mobile‘, null, null, null);
insert into frm_content (CONTENTID, FRMID, FRMTYPE, CREATEUSERID, CREATEDATE, UPDATEUSERID, UPDATEDATE, CONTENT, FLAG)
values (seq_forum.nextval, seqnum, ‘answer‘, 100224755090, to_date(‘25-08-2014 18:30:58‘, ‘dd-mm-yyyy hh24:mi:ss‘), null, null, ‘dddddddddddddddddddd‘, ‘‘);
end loop;
end;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。