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
Why select is used in sql?
Why do we use procedures in sql?
what is a database transaction? : Sql dba
Why use stored procedures?
What are different types of sql commands?
What is the least restrictive isolation level? : Transact sql
what are the performance and scalability characteristics of mysql? : Sql dba
How many sql statements are used?
What is dynamic query?
What is trigger in flip flop?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
Which is better join or subquery?
Is it possible to sort a column using a column alias?
Are there any features that are decommissioned in 11g that are not present in 11g?
What is autocommit sql?