1、使用dual配合connect by level
create table BigTable as select rownum as id from dual connect by level <= 100000;
但是有connect by level有上限,如果超出上限,系统会报,"connect by level"内存不足,我试过1000000万数据可以,但是再多就不行了。
2、 使用xmltable,"CONNECT BY 操作内存不足,10g开始支持XML后,改为xmltable就可以了",代码如下:
create table bigdata as select rownum as id from xmltable('1 to 10000000');
ok,1000万数据完美插入