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
What is the difference between join and natural join?
In a distributed database system, can we execute two queries simultaneously?
how to increment dates by 1 in mysql? : Sql dba
Can 2 queries be executed simultaneously in a distributed database system?
Can we use having without group by in sql?
how to enter characters as hex numbers? : Sql dba
What are all the ddl commands?
what is auto increment? : Sql dba
What is use of package in pl sql?
What is java sql driver?
What is attribute indicator in pl sql?
What is the difference between rollback and rollback to statements?
Mention what is the function that is used to transfer a pl/sql table log to a database table?
Which software is used for pl sql programming?
How do you identify a primary key?