Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Will sql query without order by return same result set on multiple runs?

Hozefa Palitanawala-OracleMar 5 2011 — edited Mar 5 2011
Hi,

I've a sql without order by and I restrict the number of rows to 100 max by rownum < 100. Now the question is, If the data set on which this sql runs, does not change, will the sql return the same result set on multiple execution?

For example, there are 150 rows, and the sql returns 100 rows because of rownum < 100. Now on executing the same sql multiple times, will I get the same set of 100 rows? or it could be any of the 150? On what bases these the database engine sort and return data when no order by clause is provided?

Thank you for your time.

-Hozy
This post has been answered by Frank Kulash on Mar 5 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2011
Added on Mar 5 2011
2 comments
2,519 views