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
What is sql scripting?
what is the difference between delete and truncate statement in sql? : Sql dba
What are local and global variables and their differences?
What is the location of pre_defined_functions.
Where the sql database files are stored?
Explain select statements in sql?
What are the advantages of indexing?
What is normalization in sql?
How many sql statements are used?
How many clustered indexes can you have?
What is orm in sql?
Explain the purpose of %type and %rowtype data types with the example?
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
What is the purpose of a secondary key?
How many sql statements are used? Define them.