top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How does one select the TOP N rows from a table in Oracle?

+1 vote
561 views
How does one select the TOP N rows from a table in Oracle?
posted May 28, 2015 by Viswas Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

SELECT *
FROM (SELECT * FROM my_table ORDER BY col_name_1 DESC)
WHERE ROWNUM < 10;

answer May 29, 2015 by Arun Gowda
Similar Questions
+2 votes

Its a very basic question but it would be good if anyone can answer with some explanations. When we type select * from dba_users; in sql plus it will show N rows selected and total records whereas when we type select * from employee it would show only records but not the total count.

...