Answer Posted / srinu
Hi Jyothi,
The below q uery is suitable for Nth max salary....
SELECT a.sal
FROM emp a
WHERE &N=(SELECT COUNT(DISTINCT b.sal)
FROM emp b
WHERE a.sal<=b.sal);
In the above query u can substitute any value like 1,2,..100 etc instead of &n.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between drop and truncate commands?
How can I speed up sql query?
What is a sql driver?
List the various privileges that a user can grant to another user?
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
What is difference between sql and oracle?
How many sql statements are used? Define them.
What is where clause in sql?
What are different clauses used in sql?
State few characteristics of pl/sql?
What does plv msg allows you to do?
Explain the methods used to protect source code of pl/sql.
What type of join is sql join?
What is an emotional trigger?
what tools available for managing mysql server? : Sql dba