1

对于以下查询,我期望值从 1 到 899 列出。但它只返回从 1 到 667 的值。有人可以帮我找出原因吗

select rownum from all_tables where rownum <900
4

4 回答 4

2

您的表少于 899 个。

于 2013-02-05T07:52:12.453 回答
1

the simplest row generator that would not come up short due to lack of rows in your source table / view is:

select rownum from dual connect by level < 900;
于 2013-02-05T07:56:47.000 回答
1

尝试:

select level as rnum
from dual
connect by level < 900;
于 2013-02-05T14:48:46.913 回答
0
select rownum from all_objects where rownum <900
于 2013-02-05T09:31:34.377 回答