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 a .db file?
Can %notfound return null after a fetch?
How to check if a column is nullable before setting to nullable?
How much does a sql dba make? : SQL DBA
Does varchar need length?
What are the commands used in sql?
How does cross join work?
Difference between truncate, delete and drop commands?
How do I view a view in sql?
Explain what is an index?
How many types of privileges are available in sql?
How to Execute a Package in PL/SQL.?
How do I trace sql profiler?
what is the syntax for using sql_variant_property? : Transact sql
Which is faster view or stored procedure?