Hello,
Is there a way to select a limited number of rows in Oracle 8i?
Essentially, I am selecting the newest news items from a database. I only wish to display a limited number of them, say 5.
The actual display of a limited number of them is trivial, and could easily be handled by PHP, but what I am trying to avoid is selecting out ALL of the newest news items, since there is likely to be quite a lot of them, and I would like to avoid this potentially frequent Database hit.
I have seen some suggestions for related questions that use rownum and a subselect, but since I am ordering the result set, this might not work well for me.
Any ideas?
Is there a way to select a limited number of rows in Oracle 8i?
Essentially, I am selecting the newest news items from a database. I only wish to display a limited number of them, say 5.
The actual display of a limited number of them is trivial, and could easily be handled by PHP, but what I am trying to avoid is selecting out ALL of the newest news items, since there is likely to be quite a lot of them, and I would like to avoid this potentially frequent Database hit.
I have seen some suggestions for related questions that use rownum and a subselect, but since I am ordering the result set, this might not work well for me.
Any ideas?