Oracle数据库循环插入数据

循环插入数据语句:

DECLARE 

  maxnumber CONSTANT int:=1000;
  i int:=1;
  begin
    for i in 1..maxnumber loop
      insert into TESTINDEX("NO","NAME","SEX","AGE")
      VALUES (TO_CHAR('99'+i),'xxx','男','18');
      end loop;
      DBMS_OUTPUT.PUT_LINE('成功录入数据');
      commit;
      end;

猜你喜欢

转载自blog.csdn.net/weixin_38178449/article/details/80041474