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 latest version of sql?
Does inner join return duplicate rows?
Which nosql database is best?
What is the difference between local variables and global variables?
How does postgresql compare to "nosql"?
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
Why use triggers in sql?
What is varray in pl sql?
How to avoid duplicate records in a query?
How can we debug in PL/SQL?
What does sql stand for?
What is normalisation and its types?
Can 2 queries be executed simultaneously in a distributed database system?
How can one get sql*loader to commit only at the end of the load file? : aql loader
what is query cache in mysql? : Sql dba