Can we Filter the records using ROW_NUMBER() funtion?
sql_devJun 2 2008 — edited Jun 2 2008Oracle 10G
Hi all,
In the below query i used ROW_NUMBER() function to get the rownum value after descending order the results.
How Can i filter the first 10 rows without using a subquery?
I tried to use alias names but it doesn't work. Is there a way or it should be done only with subqueries?
select article_type_id,
article_type_desc,
ROW_NUMBER() OVER ( order by article_type_id desc) rnum
from s_article_types
Results are
ARTICLE_TYPE_ID ARTICLE_TYPE_DESC RNUM
37 Non-Degree News 1
36 Career News 2
35 ET News 3
34 Hotcourses 2.0 General 4
33 Hotcourses 2.0 Permanent 5
32 Hotcourses 2.0 News 6
-
-
-
-
1 General news 37
Thanks in advance