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
What is bitemporal narrowing?
How do I count records in sql?
What is union, minus and interact commands?
Can you select everything, but 1 or 2 fields, without writer's cramp?
Is and as keyword in pl sql?
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 pl sql block structure?
what happens if null values are involved in expressions? : Sql dba
Explain raise_application_error.
Explain the significance of the & and && operators in pl sql.
What is the trigger in sql?
What are hotfixes and patches?
What is the use of procedures?
Does sql between include endpoints?
How to create an array in pl/sql?