简体   繁体   English

ORACLE QUERY与ROWNUM

[英]ORACLE QUERY with ROWNUM

I am expecting the value to be listed from 1 to 899 for the following query. 我希望以下查询的值从1到899列出。 But it returns only the value from 1 to 667. Can somebody help me to find the reason 但它只返回1到667之间的值。有人可以帮我找到原因

select rownum from all_tables where rownum <900

你有少于899个表。

由于源表/视图中缺少行而导致的最简单的行生成器是:

select rownum from dual connect by level < 900;

try: 尝试:

select level as rnum
from dual
connect by level < 900;
select rownum from all_objects where rownum <900

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM