SELECT *
FROM (
SELECT *
FROM comment
ORDER BY
comment_date DESC
)
WHERE rownum <= 10
Getting first 10 data after rearranging
Question
I have a table for comments history. I need to select only ten data after rearranging the data (order by clause) based on date (newer to older). May I know how to achieve that? Is that can be done using rownum?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow