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 / meher
Let the table name is EMP
To find 101st row the query is as below:
select * from EMP where rownum <= 101
minus
select * from EMP where rownum <= 100;
for Nth salary the query is as below:
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How long will it take to learn pl sql?
Is sql considered coding?
What is record in pl sql?
Does pdo prevent sql injection?
What is latest version of sql?
what are the 'mysql' command line options? : Sql dba
what is clause? : Sql dba
What is assignment operator in pl sql?
What is procedure and function?
Can I create table without primary key?
Why we use join in sql?
What are types of exception?
What do you understand by exception handling in pl/sql?
What are the advantages of sql? Explain
What is the difference between partitioning and sharding?