Possible Duplicate:
How do I limit the number of rows returned by an oracle query?
I have this query
select * from pr_device_reading order by date_reading DESC
Note that this query is normalized, constructed by a method, and the table name will change according to the method's argument, so I can't specify the column names (and I do want all the columns in the result anyway).
What is the equivalent of
SELECT *
FROM pr_lecture_combustibles
ORDER BY date_lecture DESC
LIMIT 10,20;
using Oracle SQL?
I have tried
SELECT *
FROM (SELECT *
FROM pr_lecture_combustibles
ORDER BY date_lecture DESC)
WHERE ROWNUM BETWEEN 10 AND 20;
and other syntax, but I get no result, "missing expression" messages and other errors.
Thanks