Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / gaurav mishra
The answer query is......
Select max(sal) from emp a where (&N-1) in(select count
(distinct(b.sal)) from emp b where a.sal<b.sal);
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
How do you drop a trigger?
How can you create an empty table from an existing table?
What is the difference between an inner and outer join?
What are analytical functions in sql?
Is pl sql different from sql?
What are the possible values for the boolean data field?
What is procedure in pl sql?
Do stored procedures prevent sql injection?
what is “go” in t-sql? : Transact sql
What is asqueryable?
Is it possible for a table to have more than one foreign key?
How do you know if a relationship is 2nf?
What are the subsets of sql?
What is synchronized subquery?
What is set serveroutput on in pl sql?