SQL 循环插入10000条

SQL> create table tt_test ( x int, y char(50) );

Table created.

SQL>
SQL> begin
  2      for i in 1 .. 100000
  3      loop
  4          insert into t values ( i, 'x' );
  5      end loop;
  6      commit;
  7  end;
  8  /

PL/SQL procedure successfully completed.

SQL>
SQL> select count(*) from t;

  COUNT(*)
----------
    100000

SQL>
SQL> drop table t;

Table dropped.

SQL>

  

你可能感兴趣的