Oracle新手-我正在尝试运行插入语句来生成大量数据。
- 原始查询是这样:
INSERT INTO HR.fastData (ID)
SELECT 1 + (Level -1) * 1
FROM dual connect by Level < 100000000;
- 收到的第一个错误:
ORA-30009:内存不足,无法进行CONNECT BY操作
-
我关注了the guidance provided here
修改后的查询:
INSERT INTO HR.fastData (ID)
SELECT 1 + (Level -1) * 1
FROM
(select level from dual connect by Level < 10000),(select level from dual connect by Level < 10000);
- 我收到的下一个错误:
ORA-01788:此查询块中需要CONNECT BY子句
- 修改后的查询现在看起来像这样:
INSERT INTO HR.fastData (ID)
SELECT 1 + (Level -1) * 1
FROM DUAL CONNECT BY
(select Level from dual connect by Level < 10000),(select Level from dual connect by level < 10000);
在多次尝试查询的不同变体之后,我无法使其正确执行。我是否正确使用/放置CONNECT BY
语句?不胜感激。
谢谢!