Question : Oracle SQL - Specific row & limit return

This should be simple for someone familiar with Oracle.

How do you limit the number of records returned by SQL (ie. sql server has select top 50 * from table)?

Second, how can you select a specific row number (isn't there something like row_id)?

Answer : Oracle SQL - Specific row & limit return

One thing you can do is to use a sub-query with an alias for the rownum column):

Select name, id from
(select some_name name,
some_id id,
rownum row_count
from some_table
where rownum <= 50)
where row_count = 35
Random Solutions  
 
programming4us programming4us