Limit The Number of Rows Returned by An Oracle Query

How do I limit the number of rows returned by an Oracle query?

Oracle. (source:

In Oracle, the only thing people mention is the rownum pseudo-column

select * from sometable where rownum <= 10

SELECT column_name(s) FROM table_name WHERE ROWNUM <= number;

Example in Java

stmt.executeQuery("SELECT airlines,dep_time,arr_time,economi_rate FROM cms_flightdetails where ROWNUM <= 5");


About Agung Pambudi

I am a Blogger with passion in business.
    Blogger Comment
    Facebook Comment


Post a Comment