Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / anil_abbireddy
select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)
Is This Answer Correct ? | 30 Yes | 8 No |
Post New Answer View All Answers
What are its different types of dbms?
What are pl/sql cursors?
What is difference between nchar and nvarchar?
Enlist some predefined exceptions?
What is the difference between count 1 and count (*) in a sql query?
What is sql integrity?
How does left join work in sql?
What are two statement types in sql?
Explain lock escalation? : Transact sql
Mention what does plv msg allows you to do?
What is the difference between jpql and sql?
How do I remove sql developer from windows 10?
What is integrity in sql?
What is where clause in sql?
Define a temp table?