adspace
suppose we have a table in which 200 rows. i want to find
101 row ? what the query....
and how we find 4th and 5th highest salary and 1 to 10
highest salary
Answer Posted / basavaraj yadwad
Let Table name : Employee
Let the columns: Employee_name, Salary
To find 101st row:
select * from (select * from Employee order by
emplayee_name) where rownum = 101
To find 4th highest salary
select * from (select * from Employee order by salary desc)
where rownum = 4
To find 5th highest salary
select * from (select * from Employee order by salary desc)
where rownum = 4
To find 1 to 10 highest salary
select * from (select * from Employee order by salary desc)
where rownum < 11
| Is This Answer Correct ? | 9 Yes | 15 No |
Post New Answer View All Answers
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
what is collation? : Sql dba
what are all the common sql function? : Sql dba
How do I remove duplicates in two columns?
What is the current version of postgresql?
what is schema? : Sql dba
What is your daily office routine?
define sql insert statement ? : Sql dba
If a cursor is open, how can we find in a pl/sql block?
Do we need to rebuild index after truncate?
how many tables will create when we create table, what are they? : Sql dba
Is inner join faster than left join?
Can we use distinct and group by together?
what is sql server agent? : Sql dba
What is the current version of sql?