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
Describe different types of general function used in sql?
what is not null constraint? : Sql dba
Is the primary key an index?
Why having clause is used in sql?
Where do we use pl sql?
What is difference between hql and native sql?
How do I debug a stored procedure?
Explain select statements in sql?
What is dynamic query?
State some properties of relational databases?
Is sql pronounced sequel or sql?
Define SQL and state the differences between SQL and other conventional programming Languages?
What are records give examples?
how to decrement dates by 1 in mysql? : Sql dba
Why we use joins in sql?