how u can find the n row from a table?
Answer Posted / rishab
select emp_name,salary,rownum from
(select emp_name,salary,r from
(select salary,emp_name,rownum r from
(select salary,emp_name,rownum
from emp
order by salary desc)
order by r)
where r<4 ---- this number must be n+1
order by salary)
where rownum=1;
-- yes rownum=1 works...
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
How subquery works in sql?
What is input buffer in sql*plus?
what is difference between delete and truncate commands? : Sql dba
what is the difference difference between procedure and packages
Advantages and disadvantages of stored procedure?
How can you select unique records from a table?
Can dml statements be used in pl/sql?
How do I remove duplicates in two columns?
explain the difference between delete , truncate and drop commands? : Sql dba
How does postgresql compare to oracle/db2/ms sql server/informix?
What is natural join in sql?
What is a nested table in word?
What is the difference between local variables and global variables?
What is pl sql and why it is used for?
What is the trigger in sql?