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 ? | 44 Yes | 12 No |
Post New Answer View All Answers
What are the query optimization techniques?
what are the differences between binary and varbinary? : Sql dba
What is an inner join sql?
What is the difference between execution of triggers and stored procedures?
Can I call a procedure inside a function?
Explain how can you save or place your msg in a table?
What is a sql driver?
Why do we need view in sql?
What is group by in sql?
What is union and union all keyword in sql and what are their differences?
What is the cause of mutating table error and how can we solve it?
What is the difference between nvl function, ifnull function, and isnull function?
what is try_catch block in procedure
Can we join 3 tables in sql?
What are the types of queries in sql?